i wonder what is the problem with the backreference here:
preg_match_all('/__\((\'|")([^\1]+)\1/', "__('match this') . 'not this'", $matches);
it is expected to match the string between __(”) but actually it returns:
match this') . 'not this
any ideas?
Make your regex ungreedy: