If this is your line and you want text between tags p, then this should work ...
/<p\sclass='link'>(.*?)<\/p>/
The reason yours doesn't work is because you add <\/p>characters to your range. This does not correspond literally, but not every character checks separately.
Of course, I’m sure to mention that there are more efficient tools for parsing HTML snippets (such as the HTML parser).
source
share