0

I'd like BBEdit to search some HTML and match every paragraph tag that contains a text string like "myText".

This sort of works but often matches beyond the closing ">" of the tag.

<p.*myText[^>]*>

As I understand it, this should match the opening angle bracket-"p", then any number of characters until it finds "myText", then any number of characters that are NOT ">" until it finds the closing ">". What's wrong?

user3238181
  • 115
  • 1
  • 10

1 Answers1

0

Use <p\s[^>]*myText[^>]*> – from comment by Wiktor Stribiżew.

Community
  • 1
  • 1
Armali
  • 18,255
  • 14
  • 57
  • 171