Comparison Of Regular Expression Engines
   HOME

TheInfoList



OR:

This is a comparison of
regular expression A regular expression (shortened as regex or regexp), sometimes referred to as rational expression, is a sequence of characters that specifies a match pattern in text. Usually such patterns are used by string-searching algorithms for "find" ...
engines.


Libraries


Languages

{, class="wikitable sortable" style="width: auto; table-layout: fixed;" , + List of languages and frameworks including regular expression support , - ! Language ! Official website !
Software license A software license is a legal instrument governing the use or redistribution of software. Since the 1970s, software copyright has been recognized in the United States. Despite the copyright being recognized, most companies prefer to sell lic ...
! Remarks , - ! ,
ActionScript ActionScript is an object-oriented programming language originally developed by Macromedia Inc. (later acquired by Adobe). It is influenced by HyperTalk, the scripting language for HyperCard. It is now an implementation of ECMAScript (mean ...
3
ActionScript Technology Center
, , style="text-align: left;" , , - ! , APL (APLX, Dyalog, GNU)
APL Wiki
, , style="text-align: left;" , ⎕SS (PCRE), ⎕R/⎕S (PCRE), ⎕SS (PCRE2), respectively , - ! ,
C++11 C++11 is a version of a joint technical standard, ISO/IEC 14882, by the International Organization for Standardization (ISO) and International Electrotechnical Commission (IEC), for the C++ programming language. C++11 replaced the prior vers ...
( C++)
C++ standards website
, , style="text-align: left;" , Since ISO14822:2011(e), similar to ECMAScript on defaul
(Grammar Description)
, - ! , D
D
, , style="text-align: left;" , , - ! ,
Elixir An elixir is a sweet liquid used for medical purposes, to be taken orally and intended to cure one's illness. When used as a dosage form, pharmaceutical preparation, an elixir contains at least one active ingredient designed to be taken orall ...

elixir-lang.org
, style="text-align: center;" {{free, Apache 2.0 , style="text-align: left;" , Standard library includes PCRE-base
Regex module
The matching algorithms of the library are based on the PCRE library, but not all of the PCRE library is interfaced and some parts of the library go beyond what PCRE offers. Currently PCRE version 8.40 (release date 2017-01-11) is used. , - ! {{Rh , Erlang
erlang.org
, style="text-align: center;" {{free, Apache 2.0 , style="text-align: left;" , Standard library includes PCRE-base
re module
The matching algorithms of the library are based on the PCRE library, but not all of the PCRE library is interfaced and some parts of the library go beyond what PCRE offers. Currently PCRE version 8.40 (release date 2017-01-11) is used. , - ! {{Rh ,
Free Pascal Free Pascal Compiler (FPC) is a compiler for the closely related programming-language dialects Pascal and Object Pascal. It is free software released under the GNU General Public License, witexception clausesthat allow static linking against it ...
(
Object Pascal Object Pascal is an extension to the programming language Pascal (programming language), Pascal that provides object-oriented programming (OOP) features such as Class (computer programming), classes and Method (computer programming), methods. T ...
)
freepascal.org
, {{partial,
LGPL The GNU Lesser General Public License (LGPL) is a free-software license published by the Free Software Foundation (FSF). The license allows developers and companies to use and integrate a software component released under the LGPL into their own ...
with static linking exception , style="text-align: left;" , Free Pascal 2.6+ ships with TRegExpr from Sorokin and two other regular expression libraries; Se
wiki.lazarus.freepascal.org/Regexpr
, - ! {{Rh , Go
go.dev
, {{fre
BSD-style
} , style="text-align: left;" , , - ! {{Rh ,
Haskell Haskell () is a general-purpose, statically typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research, and industrial applications, Haskell pioneered several programming language ...

Haskell.org
, {{free, BSD3 , style="text-align: left;" , Omitted in the language report, and in GHC's Hierarchical Libraries , - ! {{Rh ,
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...

Java
, {{free,
GNU General Public License The GNU General Public Licenses (GNU GPL or simply GPL) are a series of widely used free software licenses, or ''copyleft'' licenses, that guarantee end users the freedom to run, study, share, or modify the software. The GPL was the first ...
, style="text-align: left;" , REs are written as strings in source code: all backslashes must be doubled, harming readability. , - ! {{Rh ,
JavaScript JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior. Web browsers have ...
(
ECMAScript ECMAScript (; ES) is a standard for scripting languages, including JavaScript, JScript, and ActionScript. It is best known as a JavaScript standard intended to ensure the interoperability of web pages across different web browsers. It is stan ...
)
ECMA-262
, {{free, BSD3 , style="text-align: left;" , Limited but REs are first-class citizens of the language with a specific /.../mod syntax. , - ! {{Rh , Julia
JuliaLang.org
, {{free,
MIT License The MIT License is a permissive software license originating at the Massachusetts Institute of Technology (MIT) in the late 1980s. As a permissive license, it puts very few restrictions on reuse and therefore has high license compatibility. Unl ...
, style="text-align: left;" , REs are part of the language core library using PCRE built-in and an optional wrapper for (C code) ICU is available. , - ! {{Rh , Lua
Lua.org
, {{free,
MIT License The MIT License is a permissive software license originating at the Massachusetts Institute of Technology (MIT) in the late 1980s. As a permissive license, it puts very few restrictions on reuse and therefore has high license compatibility. Unl ...
, style="text-align: left;" , Uses simplified, limited dialect; can be bound to more powerful library, like PCRE or an alternative parser like LPeg. , - ! {{Rh ,
Mathematica Wolfram (previously known as Mathematica and Wolfram Mathematica) is a software system with built-in libraries for several areas of technical computing that allows machine learning, statistics, symbolic computation, data manipulation, network ...

Wolfram
, {{Proprietary , style="text-align: left;" , , - ! {{Rh ,
.NET The .NET platform (pronounced as "''dot net"'') is a free and open-source, managed code, managed computer software framework for Microsoft Windows, Windows, Linux, and macOS operating systems. The project is mainly developed by Microsoft emplo ...

MSDN
, {{free,
MIT License The MIT License is a permissive software license originating at the Massachusetts Institute of Technology (MIT) in the late 1980s. As a permissive license, it puts very few restrictions on reuse and therefore has high license compatibility. Unl ...
{{R, group=Note, dotnet_regex_license{{R, group=Note, dotnet_license , style="text-align: left;" , , - ! {{Rh , Nim
nim-lang.org
, {{free,
MIT License The MIT License is a permissive software license originating at the Massachusetts Institute of Technology (MIT) in the late 1980s. As a permissive license, it puts very few restrictions on reuse and therefore has high license compatibility. Unl ...
, style="text-align: left;" , Standard library includes PCRE-base
re
an

modules, as well as various alternatives (ex

(
Parsing Expression Grammar In computer science, a parsing expression grammar (PEG) is a type of analytic formal grammar, i.e. it describes a formal language in terms of a set of rules for recognizing strings in the language. The formalism was introduced by Bryan Ford in 20 ...
matching)
strscans
etc.). , - ! {{Rh ,
OCaml OCaml ( , formerly Objective Caml) is a General-purpose programming language, general-purpose, High-level programming language, high-level, Comparison of multi-paradigm programming languages, multi-paradigm programming language which extends the ...

Caml
, {{free,
LGPL The GNU Lesser General Public License (LGPL) is a free-software license published by the Free Software Foundation (FSF). The license allows developers and companies to use and integrate a software component released under the LGPL into their own ...
, style="text-align: left;" , {{As of, 2010, the standard module is generally regarded as deprecated; often recommended libraries ar
pcre
(with full support for PCRE) an
re
(which is not as complete but claims better performance and provides frontends to popular syntaxes: PCRE, Perl, Posix, Emacs, shell globbing). , - ! {{Rh ,
Perl Perl is a high-level, general-purpose, interpreted, dynamic programming language. Though Perl is not officially an acronym, there are various backronyms in use, including "Practical Extraction and Reporting Language". Perl was developed ...

Perl.com
, {{free,
Artistic License Artistic license (and more general or contextually-specific, derivative terms such as creative license, poetic license, historical license, dramatic license, and narrative license) refers to deviation from fact or form for artistic purposes. It ...
, or
GNU General Public License The GNU General Public Licenses (GNU GPL or simply GPL) are a series of widely used free software licenses, or ''copyleft'' licenses, that guarantee end users the freedom to run, study, share, or modify the software. The GPL was the first ...
, style="text-align: left;" , Full, central part of the language , - ! {{Rh , PHP
PHP.net
, {{free,
PHP License The ''PHP License'' is the open-source license under which the PHP scripting language is released. The PHP License is designed to encourage widespread adoption of the source code. Redistribution is permitted in source or binary form with or ...
, style="text-align: left;" , Has two implementations, with PCRE being the more efficient in speed, functions , - ! {{Rh , POSIX C ( C)
POSIX.1 web publication
, {{dunno, Licensed by the respective implementation , style="text-align: left;" , Support

syntax , - ! {{Rh , Python
python.org
, {{free,
Python Software Foundation License The Python Software Foundation License (PSFL) is a BSD-style, permissive software license which is compatible with the GNU General Public License (GPL). Its primary use is for distribution of the Python project software and its documentatio ...
, style="text-align: left;" , Python has two major implementations, the built i
re
and th
regex
library. , - ! {{Rh ,
Ruby Ruby is a pinkish-red-to-blood-red-colored gemstone, a variety of the mineral corundum ( aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sapph ...

ruby-lang.org
, {{free,
GNU Library General Public License The GNU Lesser General Public License (LGPL) is a free-software license published by the Free Software Foundation (FSF). The license allows developers and companies to use and integrate a software component released under the LGPL into their own ...
, style="text-align: left;" , 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. , - ! {{Rh ,
Rust Rust is an iron oxide, a usually reddish-brown oxide formed by the reaction of iron and oxygen in the catalytic presence of water or air moisture. Rust consists of hydrous iron(III) oxides (Fe2O3·nH2O) and iron(III) oxide-hydroxide (FeO(OH) ...

docs.rs
, {{free,
MIT License The MIT License is a permissive software license originating at the Massachusetts Institute of Technology (MIT) in the late 1980s. As a permissive license, it puts very few restrictions on reuse and therefore has high license compatibility. Unl ...
, style="text-align: left;" , The primary regex crate does not allow look-around expressions. There is an Oniguruma binding calle
onig
that does. , - ! {{Rh , SAP ABAP
SAP.com
, {{proprietary , style="text-align: left;" , , - ! {{Rh , Tcl
tcl.tk
, {{fre

br>(BSD-style) , style="text-align: left;" , Tcl library doubles as a regular expression library. , - ! {{Rh ,
Wolfram Language The Wolfram Language ( ) is a proprietary, very high-level multi-paradigm programming language developed by Wolfram Research. It emphasizes symbolic computation, functional programming, and rule-based programming and can employ arbitrary stru ...

Wolfram Research
, {{proprietary, Proprietary: usable for free on a limited scale on the Wolfram Development platform , style="text-align: left;" , {{Clear , - ! {{Rh ,
XML Schema An XML schema is a description of a type of XML document, typically expressed in terms of constraints on the structure and content of documents of that type, above and beyond the basic syntactical constraints imposed by XML itself. These constrai ...

W3C
, {{dunno, Licensed by the respective implementation , - ! {{Rh , XPath 3/
XQuery XQuery (XML Query) is a query language and functional programming language designed to query and transform collections of structured and unstructured data, primarily in the form of XML. It also supports text data and, through implementation-sp ...

W3C
, {{dunno, Licensed by the respective implementation {{Reflist, group=Note, refs= {{Cite web, url=http://www.digitalmars.com/d/2.0/phobos/std_regex.html, title=STD.regex - D Programming Language - Digital Mars {{Cite web, url=https://github.com/dotnet/corefx/blob/7116584186f8f3a886616aaf8cb5d4a982c60e27/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Regex.cs#L2, title=Dotnet/Corefx, website=
GitHub GitHub () is a Proprietary software, proprietary developer platform that allows developers to create, store, manage, and share their code. It uses Git to provide distributed version control and GitHub itself provides access control, bug trackin ...
, date=16 February 2022
{{Cite web, url=https://github.com/dotnet/corefx#license, title=Dotnet/Corefx, website=
GitHub GitHub () is a Proprietary software, proprietary developer platform that allows developers to create, store, manage, and share their code. It uses Git to provide distributed version control and GitHub itself provides access control, bug trackin ...
, date=16 February 2022


Language features

NOTE: An application using a library for regular expression support does not necessarily support the full set of features of the library, e.g., GNU
grep grep is a command-line utility for searching plaintext datasets for lines that match a regular expression. Its name comes from the ed command g/re/p (global regular expression search and print), which has the same effect. grep was originally de ...
uses PCRE, but supports no lookahead, though PCRE does.


Part 1

{, class="wikitable sortable" style="text-align: center; font-size: 85%; width: auto; table-layout: fixed;" , + Language feature comparison (part 1) , - ! style="width: 12em" , ! "+" quantifier ! Negated character classes ! Non-greedy quantifiers
{{R, group=Note, non_greedy ! Shy groups
{{R, group=Note, shy ! Recursion ! Look-ahead ! Look-behind ! Backreferences
{{R, group=Note, backref ! >9 indexable captures , - , {{Rh , Boost.Regex , {{yes , {{yes , {{yes , {{yes , {{yes{{R, group=Note, boost_regex_recursion , {{yes , {{yes , {{yes , {{yes , - , {{Rh , Boost.Xpressive , {{yes , {{yes , {{yes , {{yes , {{yes{{R, group=Note, xpressive_recursion , {{yes , {{yes , {{yes , {{yes , - , {{Rh , CL-PPCRE , {{yes , {{yes , {{yes , {{yes , {{No , {{yes , {{yes , {{yes , {{yes , - , {{Rh , EmEditor , {{yes , {{yes , {{yes , {{yes , {{No , {{yes , {{yes , {{yes , {{No , - , {{Rh
FREJ
, {{No{{R, group=Note, frej_non_greedy , {{No , {{Some{{R, group=Note, frej_non_greedy , {{yes , {{No , {{No , {{No , {{yes , {{yes , - , {{Rh ,
GLib GLib is a bundle of three (formerly five) low-level system libraries written in C and developed mainly by GNOME. GLib's code was separated from GTK, so it can be used by software other than GNOME and has been developed in parallel ever since ...
/GRegex , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , - , {{Rh , GNU
grep grep is a command-line utility for searching plaintext datasets for lines that match a regular expression. Its name comes from the ed command g/re/p (global regular expression search and print), which has the same effect. grep was originally de ...
, {{yes , {{yes , {{yes , {{yes , {{No , {{yes , {{yes , {{yes , {{N/A , - , {{Rh ,
Haskell Haskell () is a general-purpose, statically typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research, and industrial applications, Haskell pioneered several programming language ...
, {{yes , {{yes , {{yes , {{yes , {{No , {{yes , {{yes , {{yes , {{yes , - , {{Rh
RXP
, {{yes , {{yes , {{yes , {{yes , {{No , {{No , {{No , {{yes , {{yes , - , {{Rh , ICU Regex , {{yes , {{yes , {{yes , {{yes , {{No , {{yes , {{yes , {{yes , {{yes , - , {{Rh ,
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
, {{yes , {{yes , {{yes , {{yes , {{No , {{yes , {{yes , {{yes , {{yes , - , {{Rh ,
JavaScript JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior. Web browsers have ...
(
ECMAScript ECMAScript (; ES) is a standard for scripting languages, including JavaScript, JScript, and ActionScript. It is best known as a JavaScript standard intended to ensure the interoperability of web pages across different web browsers. It is stan ...
) , {{yes , {{yes , {{yes , {{yes , {{No , {{yes , {{yes{{R, group=Note, js_lookbehind_es2018 , {{yes , {{yes , - , {{Rh , JGsoft , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , - , {{Rh , Lua , {{yes , {{yes , {{Some{{R, group=Note, lua_non_greedy , {{no , {{no , {{no , {{no , {{yes , {{no , - ! {{Rh ,
.NET The .NET platform (pronounced as "''dot net"'') is a free and open-source, managed code, managed computer software framework for Microsoft Windows, Windows, Linux, and macOS operating systems. The project is mainly developed by Microsoft emplo ...
, {{yes , {{yes , {{yes , {{yes , {{No , {{yes , {{yes , {{yes , {{yes , - , {{Rh ,
OCaml OCaml ( , formerly Objective Caml) is a General-purpose programming language, general-purpose, High-level programming language, high-level, Comparison of multi-paradigm programming languages, multi-paradigm programming language which extends the ...
, {{yes , {{yes , {{no , {{no , {{no , {{no , {{no , {{yes , {{no , - , {{Rh , PCRE , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , - , {{Rh ,
Perl Perl is a high-level, general-purpose, interpreted, dynamic programming language. Though Perl is not officially an acronym, there are various backronyms in use, including "Practical Extraction and Reporting Language". Perl was developed ...
, {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , - , {{Rh , PHP , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , - , {{Rh , Python , {{yes , {{yes , {{yes , {{yes , {{yes{{R, group=Note, python_regex_only2 , {{yes , {{yes , {{yes , {{yes , - , {{Rh , Qt/QRegExp , {{yes , {{yes , {{yes , {{yes , {{No , {{yes , {{No , {{yes , {{yes , - , {{Rh , RE2 , {{yes , {{yes , {{yes , {{yes , {{No , {{No , {{No , {{No , {{yes , - , {{Rh , Ruby, Onigmo , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , - , {{Rh , TRE , {{yes , {{yes , {{yes , {{yes , {{No , {{No , {{No , {{yes , {{No , - , {{Rh , Vim {{Latest preview release/Vim , {{yes , {{yes , {{yes , {{yes , {{No , {{yes , {{yes , {{yes , {{No , - , {{Rh , RGX , {{yes , {{yes , {{yes , {{yes , {{No , {{yes , {{yes , {{yes , {{yes , - , {{Rh , Tcl , {{yes , {{yes , {{yes , {{yes , {{no , {{yes , {{yes , {{yes , {{yes , - , {{Rh , TRegExpr , {{yes , {{dunno , {{yes , {{dunno , {{dunno , {{dunno , {{dunno , {{dunno , {{dunno , - , {{Rh ,
XML Schema An XML schema is a description of a type of XML document, typically expressed in terms of constraints on the structure and content of documents of that type, above and beyond the basic syntactical constraints imposed by XML itself. These constrai ...
, {{yes , {{yes , {{no , {{n/a , {{no , {{no , {{no , {{no , {{n/a , - , {{Rh , XPath 3/
XQuery XQuery (XML Query) is a query language and functional programming language designed to query and transform collections of structured and unstructured data, primarily in the form of XML. It also supports text data and, through implementation-sp ...
, {{yes , {{yes , {{yes , {{yes , {{no , {{no , {{no , {{yes , {{yes , - , {{Rh
XRegExp
, {{yes , {{yes , {{yes , {{yes , {{no , {{yes , {{yes{{R, group=Note, js_lookbehind_es2018 , {{yes , {{yes {{Reflist, group=Note, refs= ''Non-greedy'' quantifiers match as few characters as possible, instead of the default as many. Note that many older, pre-
POSIX The Portable Operating System Interface (POSIX; ) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines application programming interfaces (APIs), along with comm ...
engines were non-greedy and didn't have greedy quantifiers at all.
''Shy groups'', also called ''non-capturing'' groups cannot be referred to with backreferences; non-capturing groups are used to speed up matching where the group's content does not need to be accessed later. ''Backreferences'' enable referring to previously matched groups in later parts of the regex and/or replacement string (where applicable). For instance, ''( b)\1'' matches "abab" but not "abaab". {{Cite web, url=http://www.boost.org/doc/libs/1_47_0/doc/html/xpressive/user_s_guide.html#boost_xpressive.user_s_guide.grammars_and_nested_matches.embedding_a_regex_by_reference, title = User's Guide - 1.47.0 {{Cite web, url=http://www.boost.org/doc/libs/1_47_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html#boost_regex.syntax.perl_syntax.recursive_expressions, title = Perl Regular Expression Syntax - 1.47.0 FREJ have no repetitive quantifiers, but have "optional" element which behaves similar to simple "?" quantifier. Lua's only non-greedy quantifier is -, which is a non-greedy version of *. It does not have non-greedy versions of + or ?; in the former case, the non-greedy effect can be achieved by repeating the token followed by -, but in the latter case, there is no equivalent. Supported by the optiona
regex
library only.
As of ES2018


Part 2

{, class="wikitable sortable" style="text-align: center; font-size: 85%; width: auto; table-layout: fixed;" , + Language feature comparison (part 2) , - ! style="width: 12em" , ! Directives
{{R, group=Note, directives_explanation ! Conditionals ! Atomic groups
{{R, group=Note, atomic_grouping_explanation ! Named capture
{{R, group=Note, named_groups_explanation ! Comments ! Embedded code !
Unicode Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
property support ! Balancing groups
{{R, group=Note, balancing_groups_explanation ! Variable-length look-behinds
{{R, group=Note, varlength_lookbehind_explanation , - , {{Rh , Boost.Regex , {{yes , {{yes , {{yes , {{yes , {{yes , {{No , {{Some{{R, group=Note, properties_limited , {{No , {{No , - , {{Rh , Boost.Xpressive , {{yes , {{No , {{yes , {{yes , {{yes , {{No , {{No , {{No , {{No , - , {{Rh , CL-PPCRE , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{Some{{R, group=Note, properties_limited , {{No , {{No , - , {{Rh , EmEditor , {{yes , {{yes , {{dunno , {{dunno , {{yes , {{No , {{dunno , {{No , {{No , - , {{Rh
FREJ
, {{No , {{No , {{yes , {{yes , {{yes , {{No , {{dunno , {{No , {{No , - , {{Rh ,
GLib GLib is a bundle of three (formerly five) low-level system libraries written in C and developed mainly by GNOME. GLib's code was separated from GTK, so it can be used by software other than GNOME and has been developed in parallel ever since ...
/GRegex , {{yes , {{yes , {{yes , {{yes , {{yes , {{No , {{Some{{R, group=Note, properties_limited , {{No , {{No , - , {{Rh , GNU
grep grep is a command-line utility for searching plaintext datasets for lines that match a regular expression. Its name comes from the ed command g/re/p (global regular expression search and print), which has the same effect. grep was originally de ...
, {{yes , {{yes , {{dunno , {{yes , {{yes , {{No , {{No , {{No , {{No , - , {{Rh ,
Haskell Haskell () is a general-purpose, statically typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research, and industrial applications, Haskell pioneered several programming language ...
, {{dunno , {{dunno , {{dunno , {{dunno , {{dunno , {{No , {{No , {{No , {{No , - , {{Rh
RXP
, {{yes , {{yes , {{No , {{yes , {{yes , {{No , {{No , {{No , {{No , - , {{Rh , ICU Regex , {{yes , {{no , {{yes , {{yes{{R, group=Note, available_icu_55 , {{yes , {{No , {{yes , {{No , {{No , - , {{Rh ,
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
, {{yes , {{no , {{yes , {{yes{{R, group=Note, available_java_7 , {{yes , {{No , {{Some{{R, group=Note, properties_limited , {{No , {{No , - , {{Rh ,
JavaScript JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior. Web browsers have ...
(
ECMAScript ECMAScript (; ES) is a standard for scripting languages, including JavaScript, JScript, and ActionScript. It is best known as a JavaScript standard intended to ensure the interoperability of web pages across different web browsers. It is stan ...
) , {{No , {{No , {{No , {{yes , {{No , {{No , {{Some{{R, group=Note, properties_limitedThe support and range of properties is dependent on implementation.{{cite web , title=ECMA-262, 9th edition, June 2018 ECMAScript® 2018 Language Specification , url=https://www.ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-unicodematchproperty-p , website=www.ecma-international.org , accessdate=4 August 2020 , {{No , {{yes , - , {{Rh , JGsoft , {{yes , {{yes , {{yes , {{yes , {{yes , {{No , {{Some{{R, group=Note, properties_limited , {{No , {{Yes , - , {{Rh , Lua , {{no , {{no , {{no , {{no , {{no , {{no , {{no , {{No , {{No , - , {{Rh ,
.NET The .NET platform (pronounced as "''dot net"'') is a free and open-source, managed code, managed computer software framework for Microsoft Windows, Windows, Linux, and macOS operating systems. The project is mainly developed by Microsoft emplo ...
, {{yes , {{yes , {{yes , {{yes , {{yes , {{No , {{Some{{R, group=Note, properties_limited , {{yes , {{yes , - , {{Rh ,
OCaml OCaml ( , formerly Objective Caml) is a General-purpose programming language, general-purpose, High-level programming language, high-level, Comparison of multi-paradigm programming languages, multi-paradigm programming language which extends the ...
, {{no , {{no , {{no , {{no , {{no , {{no , {{no , {{No , {{No , - , {{Rh , PCRE , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{No , {{No , - , {{Rh ,
Perl Perl is a high-level, general-purpose, interpreted, dynamic programming language. Though Perl is not officially an acronym, there are various backronyms in use, including "Practical Extraction and Reporting Language". Perl was developed ...
, {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{yes , {{No , {{No{{R, group=Note, perl5_varlength_lookbehind , - , {{Rh , PHP , {{yes , {{yes , {{yes , {{yes , {{yes , {{No , {{No , {{No , {{No , - , {{Rh , Python , {{yes , {{yes , {{yes{{R, group=Note, python_11_and_regex_only , {{yes , {{yes , {{No , {{yes{{R, group=Note, python3_regex_only , {{No , {{yes{{R, group=Note, python_regex_only2 , - , {{Rh , Qt/QRegExp , {{No , {{No , {{No , {{No , {{No , {{No , {{No , {{No , {{No , - , {{Rh , RE2 , {{yes , {{No , ? , {{yes , {{No , {{No , {{Some{{R, group=Note, properties_limited , {{No , {{No , - , {{Rh , Ruby, Onigmo , {{yes , {{yes , {{yes , {{yes , {{yes , {{No , {{Some{{R, group=Note, properties_limited , {{No , {{No , - , {{Rh , Tcl , {{yes , {{No , {{yes , {{no , {{yes , {{no , {{yes , {{No , {{No , - , {{Rh , TRE , {{yes , {{No , {{No , {{No , {{yes , {{No , {{dunno , {{No , {{No , - , {{Rh , Vim , {{yes , {{no , {{yes , {{no , {{no , {{No , {{no , {{No , {{yes , - , {{Rh , RGX , {{yes , {{yes , {{yes , {{yes , {{yes , {{no , {{yes , {{No , {{No , - , {{Rh ,
XML Schema An XML schema is a description of a type of XML document, typically expressed in terms of constraints on the structure and content of documents of that type, above and beyond the basic syntactical constraints imposed by XML itself. These constrai ...
, {{no , {{no , {{no , {{no , {{no , {{no , {{yes , {{no , {{no , - , {{Rh , XPath 3/
XQuery XQuery (XML Query) is a query language and functional programming language designed to query and transform collections of structured and unstructured data, primarily in the form of XML. It also supports text data and, through implementation-sp ...
, {{no , {{no , {{no , {{no , {{no , {{no , {{yes , {{no , {{no , - , {{Rh
XRegExp
, Leading only , {{no , {{no , {{yes , {{yes , {{no , {{yes , {{No , {{yes {{Reflist, group=Note, refs= Also known as ''flags modifiers'', ''modes modifiers'' or ''option letters''. Example pattern: "(?i:test)". Also called ''independent sub-expressions''. Similar to back references, but with names instead of indices. Available as of JDK7. Available as of ICU55. Unicode property support may be incomplete (products are continuously updated!). ''All will be incomplete'' when a new Unicode revision is released ''until'' they are updated to comply. Special feature allowing to match balanced constructs without recursion. Refers to the possibility of including quantifiers in look-behinds, thus making their length unpredictable. Experimental support added in v5.29.9. Supported by the optiona
regex
library only.
Supported by Python v3.11 and later, and the optiona
regex
library only.
May only be available in the regex library when used with Python versions after 3.3.


API features

{, class="wikitable sortable" style="width: auto; table-layout: fixed;" , + API feature comparison , - ! style="width: 12em" , ! Native
UTF-16 UTF-16 (16-bit Unicode Transformation Format) is a character encoding that supports all 1,112,064 valid code points of Unicode. The encoding is variable-length as code points are encoded with one or two ''code units''. UTF-16 arose from an earli ...
support{{R, group=Note, unicode_native ! Native
UTF-8 UTF-8 is a character encoding standard used for electronic communication. Defined by the Unicode Standard, the name is derived from ''Unicode Transformation Format 8-bit''. Almost every webpage is transmitted as UTF-8. UTF-8 supports all 1,112,0 ...
support{{R, group=Note, unicode_native ! Multi-line matching ! Partial match{{R, group=Note, partial_match_explanation , - ! {{Rh , Boost.Regex , {{No , {{No , {{yes , {{yes , - ! {{Rh ,
GLib GLib is a bundle of three (formerly five) low-level system libraries written in C and developed mainly by GNOME. GLib's code was separated from GTK, so it can be used by software other than GNOME and has been developed in parallel ever since ...
/GRegex , {{yes , {{yes , {{yes , {{yes , - ! {{Rh
RXP
, {{yes , {{yes , {{No , {{yes , - ! {{Rh , ICU Regex , {{yes , {{No , {{yes , {{dunno , - ! {{Rh ,
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
, {{Yes{{R, group=Note, Java_Unicode , {{Yes{{R, group=Note, Java_Unicode , {{yes , {{yes , - ! {{Rh ,
.NET The .NET platform (pronounced as "''dot net"'') is a free and open-source, managed code, managed computer software framework for Microsoft Windows, Windows, Linux, and macOS operating systems. The project is mainly developed by Microsoft emplo ...
, {{No{{R, group=Note, UCS2 , {{yes , {{yes , {{dunno , - ! {{Rh , PCRE , {{Yes{{R, group=Note, 8.30 , {{yes , {{yes , {{yes , - ! {{Rh , Qt/QRegExp , {{yes , {{No , {{No , {{yes{{R, group=Note, partial , - ! {{Rh , Qt/QRegularExpression , {{yes , {{yes , {{yes , {{yes , - ! {{Rh , Tcl , {{Yes , {{Yes{{R, group=Note, Conversion , {{Yes , {{dunno , - ! {{Rh , TRE , {{yes , {{yes , {{yes , {{dunno , - ! {{Rh , RGX , {{No , {{No , {{yes , {{dunno , - ! {{Rh ,
wxWidgets wxWidgets (formerly wxWindows) is a widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications. wxWidgets enables a program's GUI code to compile and run on several computer platforms with no s ...

wxRegEx
{R, group=Note, wxRegEx , {{yes , {{yes , {{yes , {{dunno , - ! {{Rh
XRegExp
, {{yes , {{yes , {{yes , {{no {{Reflist, group=Note, refs= Implementation uses original UCS-2 support/features, so it only recognizes 64K chars total (vs
UTF-16 UTF-16 (16-bit Unicode Transformation Format) is a character encoding that supports all 1,112,064 valid code points of Unicode. The encoding is variable-length as code points are encoded with one or two ''code units''. UTF-16 arose from an earli ...
's 1,112,064 characters). A Microsoft developer-representative answered a bug report on this as "will not fix" in 201

Means the format can be used internally without explicit conversion. Supports Unicode 15.0 standard from 202

Since version 8.30. Partial matching is performed implicitly, requiring a separate call to matchedLength() if an exact match fails. Tcl includes facilities to convert to and from UTF-8. Partial match of the whole regular expression. For example the pattern ".*END$" will match any string partially, but only strings ending with END full

wxRegEx uses any system supplied
POSIX The Portable Operating System Interface (POSIX; ) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines application programming interfaces (APIs), along with comm ...
library or if not available and for Unicode mode uses Henry Spencer's library.


See also

* {{Section link, Regular expression#Implementations and running times * Comparison of parser generators


References

{{Reflist


External links


Regular Expression Flavor Comparison
– Detailed comparison of the most popular regular expression flavors


Online Regular Expression Testing
– with support for Java, JavaScript, .Net, PHP, Python and Ruby
Implementing Regular Expressions
– series of articles by Russ Cox, author of RE2
Regular Expression Engines
{{Strings {{DEFAULTSORT:Comparison Of Regular Expression Engines Pattern matching Regular expression engines Regular expressions