-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
  • 17,626
  • 12
  • 64
  • 115
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
  • 586
  • 9
  • 27