Thread overview | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
December 31, 2015 [Issue 15489] regex - match/matchAll and bmatch - different output | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15489 Ivan Kazmenko <gassa@mail.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Hardware|x86_64 |All OS|Windows |All Severity|enhancement |normal -- |
January 01, 2016 [Issue 15489] regex - match/matchAll and bmatch - different output | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15489 ag0aep6g@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ag0aep6g@gmail.com Component|dmd |phobos -- |
January 01, 2016 [Issue 15489] regex - match/matchAll and bmatch - different output | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15489 --- Comment #1 from Marc Schütz <schuetzm@gmx.net> --- Digger blames this PR: dmd: Merge pull request #2768 from dawgfoto/fix11406 https://github.com/D-Programming-Language/dmd/pull/2768 fix Issue 11406 - ld.gold breaks switch table jumps Does the regex implementation use a jump table? Looks plausible. -- |
January 01, 2016 [Issue 15489] regex - match/matchAll and bmatch - different output | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15489 Marc Schütz <schuetzm@gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |schuetzm@gmx.net Component|phobos |dmd --- Comment #2 from Marc Schütz <schuetzm@gmx.net> --- bisect.ini: bad = master good = 2.064 tester = cd /tmp && dmd xx.d && ! ./xx | grep '\[]' @ag0aep6g: If digger is to be believed, dmd is actually the right component. -- |
January 01, 2016 [Issue 15489] regex - match/matchAll and bmatch - different output | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15489 --- Comment #3 from Ivan Kazmenko <gassa@mail.ru> --- (In reply to Marc Schütz from comment #1) > Digger blames this PR: > > dmd: Merge pull request #2768 from dawgfoto/fix11406 > > https://github.com/D-Programming-Language/dmd/pull/2768 > > fix Issue 11406 - ld.gold breaks switch table jumps > > Does the regex implementation use a jump table? Looks plausible. Strange. I tested with 2.069.2 but also with 2.063 and now with 2.063.2 (Jun 18, 2013 by this post: http://forum.dlang.org/post/kpp6g7$1vtn$1@digitalmars.com). There is no matchAll there yet, so I had to comment two lines, but with 2.063 and 2.063.2, match and bmatch still differ in output. And the pull is merged on Nov 17, 2013 (later). So perhaps the bug disappeared and reappeared multiple times. -- |
April 06, 2016 [Issue 15489] regex - match/matchAll and bmatch - different output | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15489 Dmitry Olshansky <dmitry.olsh@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dmitry.olsh@gmail.com --- Comment #4 from Dmitry Olshansky <dmitry.olsh@gmail.com> --- Ivan Kazmenko (In reply to Ivan Kazmenko from comment #0) > I want to test for the pattern "two consecutive characters, arbitrary sequence, the same two consecutive characters". My pattern is r"(..).*\1". It works with bmatch but not with match/matchAll. A complete example follows. > > import std.regex, std.stdio; > void main () > { > writeln (bmatch ("abab", r"(..).*\1")); // [["abab", "ab"]] > writeln (match ("abab", r"(..).*\1")); // [["abab", "ab"]] > writeln (matchAll ("abab", r"(..).*\1")); // [["abab", "ab"]] > writeln (bmatch ("xabab", r"(..).*\1")); // [["abab", "ab"]] > writeln (match ("xabab", r"(..).*\1")); // [] > writeln (matchAll ("xabab", r"(..).*\1")); // [] > } > > As you can see, bmatch (usage discouraged in the docs) gives me the result I > want, but match (also discouraged) and matchAll (way to go) don't. > Well this boils down to : a) Use what works for now. b) You might have found a case where Thompson engine simply cannot produce the right result. Finally I should detect these patterns and switch between simple backtracking and thompson engine. -- |
August 25, 2017 [Issue 15489] regex - match/matchAll and bmatch - different output | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15489 Dmitry Olshansky <dmitry.olsh@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alex.bleron@gmail.com --- Comment #5 from Dmitry Olshansky <dmitry.olsh@gmail.com> --- *** Issue 17520 has been marked as a duplicate of this issue. *** -- |
August 25, 2017 [Issue 15489] regex - match/matchAll and bmatch - different output | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15489 Dmitry Olshansky <dmitry.olsh@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dlang-bugzilla@thecybershad | |ow.net --- Comment #6 from Dmitry Olshansky <dmitry.olsh@gmail.com> --- *** Issue 16251 has been marked as a duplicate of this issue. *** -- |
August 25, 2017 [Issue 15489] regex - `(..).*\1` doesn't match "axxxx" | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15489 Dmitry Olshansky <dmitry.olsh@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|regex - match/matchAll and |regex - `(..).*\1` doesn't |bmatch - different output |match "axxxx" -- |
September 05, 2017 [Issue 15489] regex - `(..).*\1` doesn't match "axxxx" | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15489 Dmitry Olshansky <dmitry.olsh@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|dmd |phobos Assignee|nobody@puremagic.com |dmitry.olsh@gmail.com -- |
Copyright © 1999-2021 by the D Language Foundation