Skip to content

Instantly share code, notes, and snippets.

@rbuckton
Created January 15, 2021 01:15
Show Gist options
  • Save rbuckton/cb0ea57949a8dfe0b4998301b6f46552 to your computer and use it in GitHub Desktop.
Save rbuckton/cb0ea57949a8dfe0b4998301b6f46552 to your computer and use it in GitHub Desktop.
Regular Expression library flags across different engines

Based on list of Regular Expression Engines from https://en.wikipedia.org/wiki/Comparison_of_regular-expression_engines

Engine Language Flags Note
Boost.Regex C++ imsx
DEELX C++ imsg
Glib/GRegex C++ imsx
GRETA C++ Could not find documentation.
Gregex RTL, HLS Could not find documentation.
RXP RTL Could not find documentation.
Hyperscan C++ imsx Based on PCRE.
ICU C, C++ imsxw
Jakarta/Regexp Java Deprecated project. Could not find documentation.
java.util.regex Java imsxduU d flag is UNIX lines mode (only use \n for ., ^, and $).
Jregex Java imsxuX
MATLAB MATLAB imsx
Oniguruma C imxWDSPy D makes \d match only ASCII digits.
Onigmo (Oniguruma-mod) C, Ruby imxdau Fork of Oniguruma. d is Default compatiblity mode for Ruby 1.9.3.
PCRE C, C++ imnsxx
Qt/QRegExp C++ No character-based flags that I could find.
RE2 C++ imsU
RGX C++ Could not find documentation.
SubReg C iI
TPerlRegEx Object Pascal imnsxx Wrapper for PCRE.
TRE C inrU
TRegExpr Object Pascal imsgxr
XRegExp ECMAScript imguynsxA
APL APL imsx Based on PCRE.
C++ 11 C++
D D imsxg
Go Go imsU Based on RE2.
Haskell Haskell imnsxx Multiple implementations including PCRE.
ECMAScript ECMAScript imsugy
Julia Julia imsxa
Lua Lua No character-based flags that I could find.
Mathmatica Mathmatica No character-based flags that I could find.
.NET .NET imsxn
Nim Nim imnsxx Uses PCRE.
Ocaml Ocaml No character-based flags that I could find.
Perl Perl imsxxpaadlun d enables legacy problematic behavior.
PHP PHP imnsxx Uses PCRE.
POSIX C POSIX C
Python/re Python iLmsux
Python/regex Python iLmsuxV0V1
Rust Rust imsUux
SAP ABAP SAP ABAP No character-based flags that I could find.
Tcl Tcl imsxnbcepqtw
Wolfram Wolfram No character-based flags that I could find.
XML Schema XML Schema No character-based flags that I could find.
XPath 3/XQuery XPath 3/XQuery imsxq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment