regex - Regular expression to get all matches in string ends with -
please me develop regular expression return matches in string if end (&any character) eg. string a="abcd(&w)", matches should have value (&w) if a="abcd(&w), xhz(&d), there should 2 matches note: in place of comma (,) above can delimiter list [','':',';'.........]
if abcd(&w)pqrsr, xhz(&d). matches should (&d) , not (&w) since not in end before delimiter
something should work:
\(&.\)(?=[,:;]|$) this match literal (& followed character, followed literal ). requires next character 1 of ,, :, or ; or match followed end of string.
Comments
Post a Comment