Is it possible to create a regular expression of a pattern X that is not enclosed by a pattern Y using preg_match
in PHP?
for example, consider this string:
hello, i said <a>hello</a>
I want a regex that matches the first hello but not the second... I couldn't think of anything