411 REFERENCE · Wikipedia
रेग्युलर एक्सप्रेशन इंजिन की तुलना
Reference material by Wikipedia contributors. This retains its source identity and is not 411 news reporting.
यहाँ रेग्युलर एक्सप्रेशन के इंजनों की विभिन्न दृष्टियों से तुलना की गयी है।
लाइब्रेरी
+ रेग्युलर इक्सप्रेशन की लाइब्रेरियों की सूची नाम वेबसाइट प्रोग्रामन भाषा सॉफ्टवेयर लाइसेंस कहाँ प्रयुक्त Boost.RegexNote boost_regex_formerly_regex Boost C++ Libraries C++ Boost Notepad++ >= 6.0.0, EmEditor Boost.Xpressive Boost C++ Libraries C++ Boost CL-PPCRE Edi Weitz Common Lisp BSD cppre Jeff Stuart C++ GPL DEELX RegExLab C++ personal and commercial use FREJNote fuzzy_regexp_libraries Fuzzy Regular Expressions for Java Java LGPL GLib/GRegexNote glib_gregex_version GLib reference manual C LGPL GRETA Microsoft Research C++ Helios RXPF Titan IC RTL hardware accelerated regex engine for cybersecurity OEMs ICU International Components for Unicode C, C++Note icu4j ICUFoundation (Apple and Swift open-source versions) Jakarta/Regexp The Apache Jakarta Project Java Apache java.util.regex Java's User manual Java Java license jEdit JRegex JRegex Java BSD Oniguruma Kosako C BSD Atom, Take Command Console, Tera Term, TextMate, Sublime Text, SubEthaEdit, EmEditor and jq Pattwo Stevesoft Java (compatible with Java 1.0) LGPL PCRE pcre.org C, C++Note pcre_cpp BSD Nginx, Julia, HHVM, Notepad++ < 6.0.0, PHP Qt/QRegExp Digia C++ Qt GNU GPL v. 3.0,
Qt GNU LGPL v. 2.1,
Qt Commercial Kate, Kile regex - Henry Spencer's regular expression libraries ArgList C BSD RE2 RE2 C++ BSD Henry Spencer's Advanced Regular Expressions Tcl C BSD Hyperscan Intel C, x86-specific assembly (SSSE3+https://intel.github.io/hyperscan/dev-reference/getting_started.html#requirements संग्रहीत प्रति 15 जुलाई 2018 https://web.archive.org/web/20180704034157/http://intel.github.io/hyperscan/dev-reference/getting_started.html#requirements 4 जुलाई 2018 dead ) 3-clause BSD SubReg Matt Bucknall C MIT TRENote fuzzy_regexp_libraries Ville Laurikari C BSD TPerlRegEx TPerlRegEx VCL Component Object Pascal MPLv1.1 TRegExpr RegExp Studio Object Pascal Dual-license: freeware, or LGPL with static linking exception Total Commander RGX RGX C++ based component library P6R XRegExp XRegExp JavaScript MIT Wolfram Language (Mathematica) Wolfram Language Documentation Center Wolfram Language Mathematica, the Wolfram Development Platform
Note Formerly called Regex++
Included since version 2.13.0
C++ bindings were developed by Google and became officially part of PCRE in 2006.
One of fuzzy regular expression engines
ICU4J, the Java version, does not support regular expressions.
भाषाएँ
+ उन प्रोग्रामन भाषाओं की सूची जिनमें रेग्युलर इक्सप्रेसन का उपयोग हुआ है। भाषा जालस्थल सॉफ्टवेयर लाइसेंस टिप्पणी .NET MSDN MIT LicenseNote dotnet_regex_licenseNote dotnet_license POSIX C (C) libc/regex from BSD BSD According to regex(3), available from at least 4.4BSD (if not earlier) C++11 (C++) C++ standards website Since ISO14822:2011(e) D D Boost Software LicenseNote boost_mars Go Golang.org BSD-style Haskell Haskell.org BSD3 Omitted in the language report, and in GHC's Hierarchical Libraries Java Java GNU General Public License REs are written as strings in source code: all backslashes must be doubled, harming readability. जावास्क्रिप्ट (ECMAScript) ECMA-262 BSD3 Limited but REs are first-class citizens of the language with a specific /.../mod syntax. Julia JuliaLang.org MIT License REs are part of the language core library using PCRE built-in and an optional wrapper for (C code) ICU is available. Lua Lua.org MIT License Uses simplified, limited dialect; can be bound to more powerful library, like PCRE or an alternative parser like LPeg. Mathematica Wolfram Proprietary Nim nim-lang.org MIT License Standard library includes PCRE-based re and nre modules, as well as various alternatives (ex. strutils, pegs (Parsing Expression Grammar matching), strscans, parseutils, etc). Free Pascal (Object Pascal) www.freepascal.org LGPL with static linking exception Free Pascal 2.6+ ships with TRegExpr from Sorokin and two other regular expression libraries; See wiki.lazarus.freepascal.org/Regexpr. OCaml Caml LGPL 2010, the standard module is generally regarded as deprecated; 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). Perl Perl.com Artistic License, or GNU General Public License Full, central part of the language PHP PHP.net PHP License Has two implementations, with PCRE being the more efficient in speed, functions Python python.org Python Software Foundation License Python has two major implementations, the built in re and the regex library. Ruby ruby-doc.org GNU Library General Public License Ruby 1.8 and 1.9 use different engines; 1.9 integrates Oniguruma. SAP ABAP SAP.com Tcl tcl.tk Tcl/Tk License(BSD-style) Tcl library doubles as a regular expression library. ActionScript 3 ActionScript Technology Center Wolfram Language Wolfram Research Proprietary; usable for free on a limited scale on the Wolfram Development platform.
Note http://www.digitalmars.com/d/2.0/phobos/std_regex.html संग्रहीत प्रति 15 जुलाई 2018 https://web.archive.org/web/20180402220607/https://digitalmars.com/d/2.0/phobos/std_regex.html 2 अप्रैल 2018 dead
https://github.com/dotnet/corefx/blob/7116584186f8f3a886616aaf8cb5d4a982c60e27/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Regex.cs#L2
https://github.com/dotnet/corefx#license संग्रहीत प्रति 15 जुलाई 2018 https://web.archive.org/web/20180703033444/https://github.com/dotnet/corefx#license 3 जुलाई 2018 live
भाषाओं के प्रमुख विशेषताएँ
NOTE: An application using a library for regular expression support does not necessarily offer the full set of features of the library, e.g. GNU grep which uses PCRE does not offer lookahead support, though PCRE does.
भाग 1
+ Language feature comparison (part 1) "+" quantifier Negated character classes Non-greedy quantifiersNote non_greedy Shy groupsNote shy Recursion Look-ahead Look-behind BackreferencesNote backref >9 indexable captures Boost.Regex Note boost_regex_recursion Boost.Xpressive Note xpressive_recursion CL-PPCRE EmEditor FREJ Note frej_non_greedy Note frej_non_greedy GLib/GRegex GNU grep Haskell Helios RXPF ICU Regex Java जावास्क्रिप्ट (ECMAScript) JGsoft Lua Note lua_non_greedy .NET OCaml OmniOutliner 3.6.2 PCRE Perl PHP Python Note python_regex_only2 Qt/QRegExp RNote r_regex RE2 Ruby TRE Vim RGX Tcl TRegExpr XRegExp
Note Non-greedy quantifiers match as few characters as possible, instead of the default as many. Note that many older, pre-POSIX 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, ([ab]+)\1 matches "abab" but not "abaab".
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 संग्रहीत प्रति 15 जुलाई 2018 https://web.archive.org/web/20170716014956/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 16 जुलाई 2017 dead
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 संग्रहीत प्रति 15 जुलाई 2018 https://web.archive.org/web/20180325110337/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 25 मार्च 2018 dead
FREJ have no repetitive quantifiers, but have "optional" element which behaves similar to simple "?" quantifier.
http://stat.ethz.ch/R-manual/R-patched/library/base/html/regex.html Regular Expressions as used in R 15 जुलाई 2018 https://web.archive.org/web/20180704141835/http://stat.ethz.ch/R-manual/R-patched/library/base/html/regex.html 4 जुलाई 2018 dead
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 optional regex https://web.archive.org/web/20180316120114/https://pypi.python.org/pypi/regex 16 मार्च 2018 library only.
भाग 2
+ Language feature comparison (part 2) DirectivesNote directives_explanation Conditionals Atomic groupsNote atomic_grouping_explanation Named captureNote named_groups_explanation Comments Embedded code Unicode property support https://www.unicode.org/reports/tr18/ संग्रहीत प्रति 15 जुलाई 2018 https://web.archive.org/web/20180717133150/http://www.unicode.org/reports/tr18/ 17 जुलाई 2018 live Balancing groupsNote balancing_groups_explanation Variable-length look-behindsNote varlength_lookbehind_explanation Boost.Regex Note properties_limited Boost.Xpressive CL-PPCRE Note properties_limited EmEditor FREJ GLib/GRegex Note properties_limited GNU grep Haskell Helios RXPF ICU Regex Note available_icu_55 Java Note available_java_7 Note properties_limited जावास्क्रिप्ट (ECMAScript) JGsoft Note properties_limited Lua .NET Note properties_limited OCaml OmniOutliner 3.6.2 PCRE Perl PHP Python Note python_regex_only2 Note python3_regex_only Note python_regex_only2 Qt/QRegExp RE2 ? Note properties_limited Ruby Note properties_limited Tcl TRE Vim RGX XRegExp Leading only
Note Also known as Flags 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
Supported by the optional regex library only.
May only be available in the regex library when used with Python versions after 3.3
API की विशेषताएँ
+ API feature comparison Native UTF-16 supportNote unicode_native Native UTF-8 supportNote unicode_native Multi-line matching Partial matchNote partial_match_explanation Boost.Regex GLib/GRegex Helios RXPF ICU Regex Java Note Partial_Uni4 .NET Note UCS2 PCRE Note 8.30 Qt/QRegExp Tcl Note Conversion TRE RGX wxWdigets::wxRegExNote wxRegEx XRegExp
Note Implementation uses original UCS-2 support/features, so it only recognizes 64K chars total (vs UTF-16's 1,112,064 characters). A Microsoft developer-representative answered a bug report on this as "will not fix" in 2010..
Means the format can be used internally without explicit conversion.
Supports Unicode 4.0 standard from 2003; latest plans for JDK7 include Unicode 6.0 (2011) support.
Since version 8.30
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 fully.
wxRegEx uses any system supplied POSIX library or if not available and for Unicode mode uses Henry Spencer's library.
इन्हें भी देखें
रेग्युलर इक्सप्रेशन
सन्दर्ह
बाहरी कड़ियाँ
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
श्रेणी:पैटर्न खोज
श्रेणी:रेग्युलर इक्सप्रेशन