想要在单词前后提取字符串。下面是内容。
内容:
1. http://www.example.com/myplan/mp/public/pl_be?Id=543543×tamp=06280435435
2. http://www.example.com/course/df/public/pl_de?Id=454354×tamp=0628031746
3. http://www.example.com/book/rg/public/pl_fo?Id=4445577×tamp=0628031734
4. http://www.example.com/trip/tr/public/pl_ds?Id=454354×tamp=06280314546
5. http://www.example.com/trip/tr/public/pl_ds
我想为上面的字符串捕获数据,如下所示
1. http://www.example.com/myplan/mp/public/?Id=543543
2. http://www.example.com/course/df/public/?Id=454354
3. http://www.example.com/book/rg/public/?Id=4445577
4. http://www.example.com/trip/tr/public/?Id=454354
5. http://www.example.com/trip/tr/public/
我试过(. /(?![A-Za-z]{2}_[A-Za-z]{2}). (?=&))。但这无济于事。
我希望有人可以帮助我解决这个问题。