网址可能是
example.com/test?pid=123
example.com/test?test=ttt&pid=123
example.com/test#test=ttt&pid=123
example.com/test?pid=123&test=ttt&
example.com/test?xxxpid=123&test=ttt& //should not select because it has xxx prepanded.
它应该只选择pid参数值。我想出了
[^?]+(?:\?pid=([^&]+).*)?
但这是有问题的。
example.com/test?gdsfg=sdfasdfa&pid=123