Английская Википедия:Comparison of regular expression engines
Материал из Онлайн справочника
Перейти к навигацииПерейти к поиску
This is a comparison of regular expression engines.
Libraries
Languages
| 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 |
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
Part 2
API features
See also
References
External links
- Regular Expression Flavor Comparison – Detailed comparison of the most popular regular expression flavors
- Regexp Syntax Summary
- 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
Ошибка цитирования Для существующих тегов <ref> группы «Note» не найдено соответствующего тега <references group="Note"/>