2

It should be a simple question: What are the differences between the "Perl-compatible regular expressions" (PCRE), supported by many languages, and Javascript regular expressions?

Sites like regexpal.com offer a choice between the two, but I'm not sure what the differences are. A quick google produced no results, and this question looks like it should be a duplicate but is actually about matching email addresses-- no help at all, except to confirm that there are differences.

I'd be happy with a reference to a site that documents the peculiarities or limitations of multiple regexp implementations, as long as these two are included.

Community
  • 1
  • 1
alexis
  • 48,685
  • 16
  • 101
  • 161
  • 3
    And if you like wikipedia: https://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines#Language_features – ibrahim mahrir Apr 29 '17 at 13:02
  • Thank you all, that's what I was looking for. – alexis Apr 29 '17 at 13:08
  • 2
    Note that PCRE and Perl regexes are not the same thing. Take a look at http://www.regular-expressions.info/reference.html and choose PCRE/Javascript to compare the two in great detail. – Tim Pietzcker Apr 29 '17 at 13:10
  • Warning: The duplicate-making question that "already has an answer" was asked and answered in 2010... I wouldn't take those answers too seriously. The link posted above by @TimPietzcker seems to be maintained, though. (At least, the page was recently updated.) – alexis Jul 30 '20 at 09:27

0 Answers0