Английская Википедия:Comparison of regular expression engines

Материал из Онлайн справочника
Перейти к навигацииПерейти к поиску

Шаблон:Short description

This is a comparison of regular expression engines.

Libraries

List of regular expression libraries
Name Official website Programming language Software license Used by
Шаблон:Rh | Boost.RegexШаблон:R Boost C++ Libraries C++ Шаблон:Free Notepad++ >= 6.0.0, EmEditor
Шаблон:Rh | BoostШаблон:Not a typoXpressive Boost C++ Libraries C++ Шаблон:Free  
Шаблон:Rh | DEELX RegExLab C++ Шаблон:Proprietary  
Шаблон:Rh | FREJШаблон:R Fuzzy Regular Expressions for Java Java Шаблон:Free  
Шаблон:Rh | GLib/GRegexШаблон:R GLib reference manual C Шаблон:Free  
Шаблон:Rh | GNU regex Gnulib reference manual C Шаблон:Free GNU libc, GNU programs
Шаблон:Rh | GRETA Microsoft Research C++ Шаблон:Proprietary  
Шаблон:Rh |Gregex Grovf Inc. RTL, HLS Шаблон:Proprietary FPGA accelerated >100Gbit/s regex engine for cybersecurity, financial, e-commerce industries.
Шаблон:Rh | Hyperscan Intel C, x86-specific assembly (SSSE3+[1]) Шаблон:Free Rspamd
Шаблон:Rh | ICU International Components for Unicode C, C++Шаблон:R Шаблон:Free Foundation (Apple and Swift open-source versions)
Шаблон:Rh | Jakarta Regexp The Apache Jakarta Project Java Шаблон:Free  
Шаблон:Rh | java.util.regex Java's User manual Java Шаблон:Free jEdit
Шаблон:Rh | JRegex JRegex Java Шаблон:Free  
Шаблон:Rh | MATLAB Regular Expressions MATLAB Language Шаблон:Proprietary  
Шаблон:Rh | Oniguruma Kosako C Шаблон:Free Atom, Take Command Console, Tera Term, TextMate, Sublime Text, SubEthaEdit, EmEditor and jq
Шаблон:Rh | Pattwo Stevesoft Java (compatible with Java 1.0) Шаблон:Free  
Шаблон:Rh | PCRE pcre.org C, C++Шаблон:R Шаблон:Free Apache HTTP Server, Nginx, BBEdit, Edbrowse, Julia, HHVM, Notepad++ < 6.0.0, PHP, Delphi, R, Exim SWI-Prolog
Шаблон:Rh | Qt/QRegExp Digia Шаблон:Webarchive C++ Шаблон:Partial Kate, Kile
Шаблон:Rh | regex - Henry Spencer's regular expression libraries ArgList C Шаблон:Free  
Шаблон:Rh | RE2 RE2 C++ Шаблон:Free Go, Google Sheets, Gmail, G Suite
Шаблон:Rh | Henry Spencer's Advanced Regular Expressions Tcl C Шаблон:Free  
Шаблон:Rh | RGX RGX C++ based component library Шаблон:Proprietary  
Шаблон:Rh | RXP Titan IC RTL Шаблон:Proprietary hardware-accelerated search acceleration using RegEx available for ASIC, FPGA and cloud. Enables massively parallel content processing at ultra-high speeds.
Шаблон:Rh | SubReg Matt Bucknall C Шаблон:Free  
Шаблон:Rh | TPerlRegEx TPerlRegEx VCL Component Object Pascal Шаблон:Free  
Шаблон:Rh | TREШаблон:R Ville Laurikari C Шаблон:Free musl
Шаблон:Rh | TRegExpr TRegExpr, documentation,

(RegExp Studio)

Object Pascal Шаблон:Partial Total Commander
Шаблон:Rh | Wolfram Language (Mathematica) Wolfram Language Documentation Center Wolfram Language Шаблон:Proprietary Mathematica, the Wolfram Development Platform
Шаблон:Rh | XRegExp XRegExp JavaScript Шаблон:Free  

Шаблон:Reflist

Languages

List of languages and frameworks including regular expression support
Language Official website Software license Remarks
Шаблон:Rh | ActionScript 3 ActionScript Technology Center Шаблон:Free
Шаблон:Rh | APL (APLX, Dyalog, GNU) APL Wiki Шаблон:Dunno ⎕SS (PCRE), ⎕R/⎕S (PCRE), ⎕SS (PCRE2), respectively
Шаблон:Rh | C++11 (C++) C++ standards website Шаблон:Dunno Since ISO14822:2011(e), similar to ECMAScript on default (Grammar Description)
Шаблон:Rh | D D Шаблон:Free
Шаблон:Rh | Free Pascal (Object Pascal) freepascal.org Шаблон:Partial Free Pascal 2.6+ ships with TRegExpr from Sorokin and two other regular expression libraries; See wiki.lazarus.freepascal.org/Regexpr.
Шаблон:Rh | Go Golang.org Шаблон:Free
Шаблон:Rh | Haskell Haskell.org Шаблон:Free Omitted in the language report, and in GHC's Hierarchical Libraries
Шаблон:Rh | Java Java Шаблон:Free REs are written as strings in source code: all backslashes must be doubled, harming readability.
Шаблон:Rh | JavaScript (ECMAScript) ECMA-262 Шаблон:Free Limited but REs are first-class citizens of the language with a specific /.../mod syntax.
Шаблон:Rh | Julia JuliaLang.org Шаблон:Free 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 Uses simplified, limited dialect; can be bound to more powerful library, like PCRE or an alternative parser like LPeg.
Шаблон:Rh | Mathematica Wolfram Шаблон:Proprietary
Шаблон:Rh | .NET MSDN Шаблон:Free
Шаблон:Rh | Nim nim-lang.org Шаблон:Free Standard library includes PCRE-based re and nre modules, as well as various alternatives (ex. strutils, pegs (Parsing Expression Grammar matching), strscans, parseutils, etc.).
Шаблон:Rh | OCaml Caml Шаблон:Free Шаблон:As of, the standard module is generally regarded as deprecated;[2] often recommended libraries are pcre (with full support for PCRE) and 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.com Шаблон:Free Full, central part of the language
Шаблон:Rh | PHP PHP.net Шаблон:Free Has two implementations, with PCRE being the more efficient in speed, functions
Шаблон:Rh | POSIX C (C) POSIX.1 web publication Шаблон:Dunno Supports POSIX BRE and ERE syntax
Шаблон:Rh | Python python.org Шаблон:Free Python has two major implementations, the built in re and the regex library.
Шаблон:Rh | Ruby ruby-doc.org Шаблон:Free 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 docs.rs Шаблон:Free The primary regex crate does not allow look-around expressions. There is an Oniguruma binding called onig that does.
Шаблон:Rh | SAP ABAP SAP.com Шаблон:Proprietary
Шаблон:Rh | Tcl tcl.tk Шаблон:Free Tcl library doubles as a regular expression library.
Шаблон:Rh | Wolfram Language Wolfram Research Шаблон:Proprietary
Шаблон:Rh | XML Schema W3C Шаблон:Dunno
Шаблон:Rh | XPath 3/XQuery W3C Шаблон:Dunno

Шаблон:Reflist

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 uses PCRE, but supports no lookahead, though PCRE does.

Part 1

Language feature comparison (part 1)
"+" quantifier Negated character classes Non-greedy quantifiers
Шаблон:R
Shy groups
Шаблон:R
Recursion Look-ahead Look-behind Backreferences
Шаблон:R
>9 indexable captures
Шаблон:Rh | Boost.Regex Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:YesШаблон:R Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes
Шаблон:Rh | Boost.Xpressive Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:YesШаблон:R Шаблон: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 Шаблон:No Шаблон:SomeШаблон:R Шаблон:Yes Шаблон:No Шаблон:No Шаблон:No Шаблон:Yes Шаблон:Yes
Шаблон:Rh | GLib/GRegex Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes
Шаблон:Rh | GNU grep Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:No Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:N/A
Шаблон:Rh | Haskell Шаблон: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 Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:No Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes
Шаблон:Rh | JavaScript (ECMAScript) Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:No Шаблон:Yes Шаблон:YesШаблон:R Шаблон:Yes Шаблон:Yes
Шаблон:Rh | JGsoft Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:No Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes
Шаблон:Rh | Lua Шаблон:Yes Шаблон:Yes Шаблон:SomeШаблон:R Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:Yes Шаблон:No
Шаблон:Rh | .NET Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:No Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes
Шаблон:Rh | OCaml Шаблон:Yes Шаблон:Yes Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:Yes Шаблон:No
Шаблон:Rh | PCRE Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes
Шаблон:Rh | Perl Шаблон: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 Шаблон: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 Шаблон:Yes Шаблон:Yes Шаблон:No Шаблон:N/a Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:N/a
Шаблон:Rh | XPath 3/XQuery Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:No Шаблон:No Шаблон:No Шаблон:Yes Шаблон:Yes
Шаблон:Rh | XRegExp Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:No Шаблон:Yes Шаблон:YesШаблон:R Шаблон:Yes Шаблон:Yes

Шаблон:Reflist

Part 2

Language feature comparison (part 2)
Directives
Шаблон:R
Conditionals Atomic groups
Шаблон:R
Named capture
Шаблон:R
Comments Embedded code Unicode property support [3] Balancing groups
Шаблон:R
Variable-length look-behinds
Шаблон:R
Шаблон:Rh | Boost.Regex Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:No Шаблон:SomeШаблон:R Шаблон: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 Шаблон: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/GRegex Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:No Шаблон:SomeШаблон:R Шаблон:No Шаблон:No
Шаблон:Rh | GNU grep Шаблон:Yes Шаблон:Yes Шаблон:Dunno Шаблон:Yes Шаблон:Yes Шаблон:No Шаблон:No Шаблон:No Шаблон:No
Шаблон:Rh | Haskell Шаблон: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 Шаблон:Yes Шаблон:No Шаблон:Yes Шаблон:No Шаблон:No
Шаблон:Rh | Java Шаблон:Yes Шаблон:No Шаблон:Yes Шаблон:YesШаблон:R Шаблон:Yes Шаблон:No Шаблон:SomeШаблон:R Шаблон:No Шаблон:No
Шаблон:Rh | JavaScript (ECMAScript) Шаблон:No Шаблон:No Шаблон:No Шаблон:Yes Шаблон:No Шаблон:No Шаблон:SomeШаблон:R[Note 1][4] Шаблон:No Шаблон:Yes
Шаблон:Rh | JGsoft Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:No Шаблон:SomeШаблон:R Шаблон:No Шаблон:Yes
Шаблон:Rh | Lua Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:No
Шаблон:Rh | .NET Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:No Шаблон:SomeШаблон:R Шаблон:Yes Шаблон:Yes
Шаблон:Rh | OCaml Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:No
Шаблон:Rh | PCRE Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:No Шаблон:No
Шаблон:Rh | Perl Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:No Шаблон:NoШаблон:R
Шаблон:Rh | PHP Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:No Шаблон:No Шаблон:No Шаблон:No
Шаблон:Rh | Python Шаблон:Yes Шаблон:Yes Шаблон:YesШаблон:R Шаблон:Yes Шаблон:Yes Шаблон:No Шаблон:YesШаблон:R Шаблон:No Шаблон:YesШаблон:R
Шаблон:Rh | Qt/QRegExp Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:No
Шаблон:Rh | RE2 Шаблон:Yes Шаблон:No ? Шаблон:Yes Шаблон:No Шаблон:No Шаблон:SomeШаблон:R Шаблон:No Шаблон:No
Шаблон:Rh | Ruby, Onigmo Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:No Шаблон:SomeШаблон:R Шаблон: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 Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:Yes Шаблон:No Шаблон:No
Шаблон:Rh | XPath 3/XQuery Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:No Шаблон:Yes Шаблон:No Шаблон:No
Шаблон:Rh | XRegExp Leading only Шаблон:No Шаблон:No Шаблон:Yes Шаблон:Yes Шаблон:No Шаблон:Yes Шаблон:No Шаблон:Yes

Шаблон:Reflist

API features

API feature comparison
Native UTF-16 supportШаблон:R Native UTF-8 supportШаблон:R Multi-line matching Partial matchШаблон:R
Шаблон:Rh | Boost.Regex Шаблон:No Шаблон:No Шаблон:Yes Шаблон:Yes
Шаблон:Rh | GLib/GRegex Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes
Шаблон:Rh | RXP Шаблон:Yes Шаблон:Yes Шаблон:No Шаблон:Yes
Шаблон:Rh | ICU Regex Шаблон:Yes Шаблон:No Шаблон:Yes Шаблон:Dunno
Шаблон:Rh | Java Шаблон:YesШаблон:R Шаблон:YesШаблон:R Шаблон:Yes Шаблон:Yes
Шаблон:Rh | .NET Шаблон:NoШаблон:R Шаблон:Yes Шаблон:Yes Шаблон:Dunno
Шаблон:Rh | PCRE Шаблон:YesШаблон:R Шаблон:Yes Шаблон:Yes Шаблон:Yes
Шаблон:Rh | Qt/QRegExp Шаблон:Yes Шаблон:No Шаблон:No Шаблон:YesШаблон:R
Шаблон:Rh | Qt/QRegularExpression Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Yes
Шаблон:Rh | Tcl Шаблон:Yes Шаблон:YesШаблон:R Шаблон:Yes Шаблон:Dunno
Шаблон:Rh | TRE Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Dunno
Шаблон:Rh | RGX Шаблон:No Шаблон:No Шаблон:Yes Шаблон:Dunno
Шаблон:Rh | wxWidgets::wxRegExШаблон:R Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:Dunno
Шаблон:Rh | XRegExp Шаблон:Yes Шаблон:Yes Шаблон:Yes Шаблон:No

Шаблон:Reflist

See also

References

Шаблон:Reflist

External links

Шаблон:Strings


Ошибка цитирования Для существующих тегов <ref> группы «Note» не найдено соответствующего тега <references group="Note"/>