The three cases will indeed match a string from < to the first > on its right, for different reasons. Either because the ? modifier can be understood to mean "as soon as a match is found, from left to right" and therefore find "the first match", or because no > can be contained in the capture. (?!>). and [^>] match the same thing under /s.
In reply to Re: Difference between these regexes
by Eily
in thread Difference between these regexes
by haukex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |