Talk:Comparison of regular expression engines: Difference between revisions

Content deleted Content added
GreenC bot (talk | contribs)
No edit summary
 
(11 intermediate revisions by 8 users not shown)
Line 1:
{{WikiProject Computingbanner shell|class=List|importance=|software=yes|software-importance=}}
{{WikiProject Computing|importance=Low|software=yes|software-importance=Low}}
}}
{{Broken anchors|links=
* <nowiki>[[Regular expression#Fuzzy regular expressions|fuzzy regular expression]]</nowiki> The anchor (#Fuzzy regular expressions) has been [[Special:Diff/693310524|deleted by other users]] before. <!-- {"title":"Fuzzy regular expressions","appear":{"revid":556036708,"parentid":555983164,"timestamp":"2013-05-21T01:36:54Z","replaced_anchors":{"Fuzzy Regular Expressions":"Fuzzy regular expressions"},"removed_section_titles":["Fuzzy Regular Expressions"],"added_section_titles":["Fuzzy regular expressions"]},"disappear":{"revid":693310524,"parentid":692694255,"timestamp":"2015-12-01T19:20:24Z","removed_section_titles":["Fuzzy regular expressions"],"added_section_titles":["Fuzzy regexps"]},"very_different":false,"rename_to":"Fuzzy regexes"} -->
}}
 
== python regex module missing ==
https://pypi.python.org/pypi/regex supports a broader set of features than pythons standard re module, especially recursive pattern matching --[[User:ThomasKalka|ThomasKalka]] ([[User talk:ThomasKalka|talk]]) 11:02, 28 March 2016 (UTC)
 
:Linked in the "Remarks" column for Python in the [[Comparison of regular expression engines#Languages|Languages table]]. [[User:Rootsmusic|rootsmusic]] ([[User talk:Rootsmusic|talk]]) 22:36, 14 December 2023 (UTC)
 
== Jan-2010 Update ==
Line 103 ⟶ 110:
 
{{reflist-talk}}
 
== Engines could be categorized ==
 
- There are official types of engines: DFA / NFA with the distinction Traditional NFA, Posix NFA (see. [https://www.oreilly.com/library/view/mastering-regular-expressions/0596528124/ch04.html Mastering Regular Expressions, 3rd Edition by Jeffrey E.F. Friedl, chapter 4])
- And there is a strong grouping of Perl compatibility (which drove regex developments some years ago). Perl 5.005 introduced new features ([https://perldoc.perl.org/perl5005delta.html#Regular-Expressions Perl 5.005 Regular Expression improvements]) like Lookbehinds, Conditional Expressions, Atomic Groups. Perl 5.10 introduced other new features ([https://perldoc.perl.org/perl5100delta.html#Regular-expressions Perl 5.1 Regular Expression improvements]) many years later like Named Capture Buffers, Possessive Quantifiers, Relative Backreferences, \K, among others. The regex engine in version 5.10 was developed in collaboration with the PCRE project, the most interesting features were added beween 1997 and 2007 ([https://www.rexegg.com/pcre-documentation.html Curated PCRE history]).
 
As Perl is/was the defacto standard for regex, most of the engines in this Wikipedia article have a grammar and feature clearly set before the Perl 5.005 release, between Perl 5.005 and 5.10, or after Perl 5.10.
 
Sebastian --[[Special:Contributions/88.217.185.170|88.217.185.170]] ([[User talk:88.217.185.170|talk]]) 21:47, 12 October 2019 (UTC)
 
:A bit of digging provided: PCRE was created 1997, when Perl 5.004 was out. PCRE 2.0 was created in 1998, when Perl 5.005 (with regex updates) was released. PCRE 7.0-7.3 were done in 2006-2007 in co-development for Perl 5.10 (with more groundbreaking regex updates). Sebastian --[[Special:Contributions/88.217.185.170|88.217.185.170]] ([[User talk:88.217.185.170|talk]]) 22:20, 12 October 2019 (UTC)
 
== About Java Regex Variable-length lookaround ==
 
I just tested regex "(?<=[a-z]+)[0-9]+" on some Java platforms, including Oracle JDK and OpenJDK 1.8, Oracle JDK and OpenJDK 17 at the text "abcd12345", and it gave the correct result "12345"; the variable-width look-ahead regex "[0-9]+(?=[a-z]+)" also works fine on Java on my machine. But on Android platform with API level 29 and Java source/target compatibility version 1.8, this regular expression has a compilation error for the reason of "non-fixed width look-behind". Also on the website [https://regex101.com/r/kB8Y47/1 regex test] it fails with Java 8 flavor.
 
I don't know how these work on Java, and the different results above, very confused now. <!-- Template:Unsigned --><span class="autosigned" style="font-size:85%;">—&nbsp;Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:Bczhc|Bczhc]] ([[User talk:Bczhc#top|talk]] • [[Special:Contributions/Bczhc|contribs]]) 02:52, 5 February 2022 (UTC)</span> <!--Autosigned by SineBot-->
 
:and is there a need to add "variable-length lookahead" future property on regular expression features part 2? [[User:Bczhc|Bczhc]] ([[User talk:Bczhc|talk]]) 02:57, 5 February 2022 (UTC)
 
 
== possessive quantifiers ==
 
I'm missing the feature "possessive quantifiers" that some RegEx dialects have. I can only find the distinction between greedy and non-greedy, but technically there is greedy, lazy/reluctant and possessive.