Trying to get a regex (Javascript).
Input: url.html?id=14114&yolo=hahaha
Output: id=14114
yolo=hahaha
So this is what i have done so far: (\&|\?)(.*?)\=(.*?)
How do I also include the red circled regions?
Answer
How about this pattern:
(\?|\&)([^=]+)\=([^&]+)
No comments:
Post a Comment