so basically i just need some help with my regex pattern, it works but it captures the opening parenthesis and i don’t want it to do that. i need it to search up to that but no include it in the return. i have an array that i imploded and glued with an asterisk
$string = 'this is a test*Yes this is a (poor test)*But its easy';
now i want to, in one fail swoop get all text up to and not including the ( and split it by *
this is what i have at the moment, which almost works but it is including the ( in the output.
$delimiter = '/.+[(*]/U';
oh and i am using preg_match_all()
Well, match
instead. Which will match a sequence of characters that are not an opening parenthesis. So
matching will stop right before the next opening parenthesis.