-1

Using BBEdit Grep, I want to convert all

<div>
Text
</div>

to

<p>
Text
</p>

The Text should, of course, remain the same, untouched.

I am using Search <div>([^>]*)</div> with Replace <p>\1</p>, but this Replace does not work when Text has tags, like <em>, or links.

2 Answers2

0

Find: <(/?)div>

Replace: <\1p>

C0c0b33f
  • 176
  • 7
-1

This works too:

Search: <div>([\s\S]*?)</div>

Replace: <p>\1</p>