开发者

grep/regex search for X but not Y?

开发者 https://www.devze.com 2023-04-12 22:03 出处:网络
BBEdit has an excellent \"multi-file search\" feature that can search with Grep. I have some 开发者_如何学JAVAPHP code in need of cleaning up. For example, I\'d like to find all instances of ...

BBEdit has an excellent "multi-file search" feature that can search with Grep. I have some 开发者_如何学JAVAPHP code in need of cleaning up. For example, I'd like to find all instances of ...

FROM table

... but not ...

FROM `table`

In other words, I want find "FROM xyz" where the first character of xyz is NOT the carat symbol.

Is this doable?


Try this regex:

/FROM \b\w+\b/
0

精彩评论

暂无评论...
验证码 换一张
取 消