javascript - Match group url parameter using Regular Expression? -
my url looks below format:
http://www.example.com/?n=abc&ntt=345999&nr=and(or(analysistechnique:acids),or(chemicalgroup:acetic%20acids)) i wanted extract nr grouping parameter value below format:
analysistechnique:acids, chemicalgroup:aceticacids any help on this?
that work given url, should add together more info improve regex:
nr=[\w()]+[(]([\w%]+:[\w%]+)[,\w()]+[(]([\w%]+:[\w%]+) first grouping matches analysistechnique:acids , sec grouping matches chemicalgroup:aceticacids
http://regex101.com/r/jz1ij1
javascript url
No comments:
Post a Comment