notepad++ select text until catch a specifc character

好久不见. 提交于 2019-12-25 18:25:05

问题


I have a text like this

ROW0_ccTag=AA+AA&ysco=45aa&ROW0_ccHandle=123456789123&

I want to select those

_ccTag=AA+AA&
_ccHandle=123456789123&

I tried this expression

\_ccTag\=.+

but it's selecting the whole text until the last & I want to select until the first & catch


回答1:


You have to have an end point and the lazy operator:

\_ccTag\=.+?\&

https://regex101.com/r/jY3qN7/1




回答2:


Give this a try (included an | alternate match):

\_ccTag=.+?\&|\_ccHandle\=.+?\&


来源:https://stackoverflow.com/questions/36635915/notepad-select-text-until-catch-a-specifc-character

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!