'Rewriting url without a speicifc query parameter using regex
I'm trying to rewrite the URL without a specific query string
https://example.com?specialVar=xXx1x¶1=xxxx&specialVar=1234¶2=xxxxxx&specialVar=333331¶3=xxxxxx&specialVar=1233z&specialVar=1233z
I need about url to be rewritten as
https://example.com?para1=xxxx¶2=xxxxxx¶3=xxxxxx
I've tried doing this
&?specialVar=[\d|a-zA-z]*
The result is :
https://example.com?¶1=xxxx¶2=xxxxxx¶3=xxxxxx
I can't seems to figure out a way to keep only ? not ?& both.
Would much appreciate your help. Thanks!
Solution 1:[1]
Maybe this
specialVar=[\d|a-zA-z]*&?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Maksym |
