Perl compatible regular expression (PCRE) in Python
Perl compatible regular expression (PCRE) in Python I have to parse some strings based on PCRE in Python, and I've no idea how to do that. Strings I want to parse looks like: match mysql m/^.n(4.[-.w]+).../s p/MySQL/ i/$1/ In this example, I have to get this different items: "m/^.n(4.[-.w]+).../s" ; "p/MySQL/" ; "i/$1/" The only thing I've found relating to PCRE manipulation in Python is this module: http://pydoc.org/2.2.3/pcre.html (but it's written it's a .so file ...) Do you know if some Python module exists to parse this kind of string? Just to be clear: You want to match PCREs, not use them? – Tim Pietzcker Aug 15 '11 at 9:37 I have to use them – Steeve Aug 15 '11 at 9:41 ...
