Regex: find whatever comes after one thing before another thing

后端 未结 4 636
南笙
南笙 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:15

    The simplest way to do this is with a selector s=([^&]*)&. The inside of the parentheses has [^&] to prevent it from grabbing hello&p=3 of there were another field after p.

提交回复
热议问题