-3

These two expressions match some elements different, I don't understand why. The task is to match a text between <p> and </p>. But one test fails and I can not see it. Where is the problem?

Filburt
  • 16,221
  • 12
  • 59
  • 107
NoNa
  • 3
  • 1

1 Answers1

0

If you have for example such string: asd<p>qwe</p>zxc

The <p>(.+?)<\/p> will find:

<p>qwe</p>

And the (?<=<p>)(.+?)(?=<\/p>) will find:

qwe
Pavlo Plynko
  • 568
  • 8
  • 25