开发者

How can I use plaintext when a regular expression is the only option?

开发者 https://www.devze.com 2023-03-21 02:17 出处:网络
I notice that some programs (like xdotool for instance) absolutely require a regular expression for searching. Is there something more clever one can do except figuring out what the d开发者_如何学Cial

I notice that some programs (like xdotool for instance) absolutely require a regular expression for searching. Is there something more clever one can do except figuring out what the d开发者_如何学Cialect of the regular expression you are faced with and escaping anything?


There is no way... you already partly answered your question. What you can do is use a small script that auto-escapes everything needed based on the dialect so you don't have to do this manually. Search here at SO, there are small sed scripts to do that.

0

精彩评论

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