开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜