What's different between Python and Javascript regular expressions?

Question!

Are Python and JavaScript regular expression syntax identical?

If not, then:

  1. What are the important differences between them
  2. Is there a python library that "implements" JavaScript regexps?
By : Dave Peck


Answers

Part 1
They are different; One difference is Python supports Unicode and Javascript doesn't.

Part 2
Read Mastering Regular Expressions. It gives information on how to identify the back-end engines (DFA vs NFA vs Hybrid) that a regex flavour uses. It gives tons of information on the different regex flavours out there.

There is way too much information to convey on a single SO answer, so you're better off having a solid piece of reference material on the subject.





There is a comparison table here:

Regex Flavor Comparison

By : EBGreen


This video can help you solving your question :)
By: admin