I found this post: Python Regex vs PHP Regex but I actually did not get if Python’s REGEX syntax matches PHP’s REGEX syntax.
I started to convert some of my old PHP code to python (due to g’s appengine etc.), and now I would like to know whether the regex is 100% convertable, by simple copy & paste.
regards,
Python uses a syntax similar to the Perl syntax and PHP uses the Perl Compatible Regular Expressions syntax, so it should be nearly the same. Read about the possible differences.
The only real difference is that in PHP, the expression must be enclosed in delimiters.