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.
精彩评论