Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What regular expression engine does Nginx use?

Tags:

regex

nginx

What regular expression engine does Nginx use? There are a lot of possibilities. More to the point, what flavor of syntax does it support, that is, what syntax features can I make use of?

like image 568
David Eyk Avatar asked Jan 02 '13 18:01

David Eyk


People also ask

Did Perl invent regex?

In the 1980s, the more complicated regexes arose in Perl, which originally derived from a regex library written by Henry Spencer (1986), who later wrote an implementation of Advanced Regular Expressions for Tcl.

Which regex engine does Java use?

It is generally also the regex flavor used by applications developed in these programming languages. Java: The regex flavor of the java. util. regex package, available in the Java 4 (JDK 1.4.

Which regex engine does Python use?

Python has two major implementations, the built in re and the regex library. Ruby 1.8, Ruby 1.9, and Ruby 2.0 and later versions use different engines; Ruby 1.9 integrates Oniguruma, Ruby 2.0 and later integrate Onigmo, a fork from Oniguruma.

Is DSL a regex?

Thanks! Another perspective: Look at regular expressions as a "DSL" for regular automata. regular expressions already are a domain specific language -- a language for parsing expressions. It may not be very human-friendly but it is a language for a very specific domain.


Video Answer


1 Answers

Nginx uses the PCRE library. The compile-time options list has some notes on this.

like image 106
Dave S. Avatar answered Oct 20 '22 15:10

Dave S.