简体   繁体   中英

regular expression lookbehind in EMeditor

In EMeditor I tried to grab string with regular expression lookbehind.

For example, I hope to grab in "Web" in "World Wide Web"

W.*?b

will grab 1st "World Wide Web" / 2nd "Wide Web" / 3rd "Web" serially.

I hope to grab "Web" first with non-greedy quantifier.

This has nothing to do with look behinds.

The problem is that your regex will match the first W it hits. What you want is this:

W\w*b

Which will only match word characters. Or even this to match anything not a space:

W\S*b

Consider the following Regex...

W\w*$

Good Luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM