You can use a negative lookahead to achieve the affect you are after
/( start # match start (?: # followed by . # anything (?!start) # not followed by start )+? # but match as little as possible end # until there is an end )/gisx
In reply to Re: Multiple regex matches in single string
by hipowls
in thread Multiple regex matches in single string
by Elijah
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |