What's the use of Deterministic Regular Expressions?

What specifically makes Perl superior for regular expressions?

  • I've frequently heard peers say that Perl is "good when you need to use regular expressions". Whenever I ask how or why Perl is better than other scripting languages for writing regular expressions, I never get a specific answer.

  • Answer:

    1. Perl has regex built directly into the language. Other programming languages need a module/library to use them. raw Perl without any modules, can handle regex. 2. Perl's regex parser is so great that other languages have either ported Perl's parser over, or reimplemented them to handle regexes the way Perl does, all the way down to syntax. 3. Perl's regexes are quicker. It's not as much work for Perl to parse regex as it is in other languages so many Perl idioms revolve around regex. In other languages, regexs are relegated to special cases. Regexes in Perl are ubiquitous. These are the main reasons. Regex in perl is a feature, not an appendage.

Marcelle Bonterre at Quora Visit the source

Was this solution helpful to you?

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.