var url = "https://api.xxx.com/search?name=xxx&age=xxx&sex=xxx";
Given this url, match the parameter string following?
(not including?) through a regular expression. Please tell me how to write the regular expression. Xiaobai asks for advice~~
Because js does not support forward lookahead syntax, it cannot use the syntax
(?<=?)
, so we can only save the country through curves:This does not require regularization.
pos = str.indexOf('?')
str.substring(pos+1)