Regex: find whatever comes after one thing before another thing

后端 未结 4 626
南笙
南笙 2021-01-15 17:55

I want to find anything that comes after s= and before & or the end of the string. For example, if the string is

t=qwert

4条回答
  •  死守一世寂寞
    2021-01-15 18:07

    \bs=([^&]+) and grabbing $1should be good enough, no?

    edit: added word anchor! Otherwise it would also match for herpies, dongles...

提交回复
热议问题