2013年4月25日

Escaping regex string in Python

摘要: Q:I want to use input from a user as a regex pattern for a search over some text. It works, but how I can handle cases where user puts characters that have meaning in regex? For example, the user wants to search for Word(s): regex engine will take the(s)as a group. I want it to treat it like a strin 阅读全文

posted @ 2013-04-25 15:17 SYSTEM ADMINISTRATION 阅读(238) 评论(0) 推荐(0) 编辑

导航