Php – I want a regex pattern to grab text within a pattern that excludes matches followed by a particular string
I'm using preg_match_all() like this: preg_match_all('/("user":"(.*?)".*?-->)/', $input_lines, $output_array); On a string, the idea is that I want it to get whatever comes after "user" in a commented out block (it's a long story). So let's say $input_lines is something like:…