New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
)> in regex results in stuff being matched wrongly ( /)> . <(/ ) #6220
Comments
From @AlexDanielCode: Result (2015.12 … 2017.03): Result (2017.04.3, HEAD(701dab3)) 「bc」 is definitely wrong and #<failed match> is kinda right. Bisectable points to these two commits: IRC log: https://irclog.perlgeek.de/perl6-dev/2017-05-02#i_14521403 |
From @jnthnOn Tue, 02 May 2017 14:51:47 -0700, alex.jakimenko@gmail.com wrote:
Given it can never match, a compile-time error might be the best solution. |
The RT System itself - Status changed from 'new' to 'open' |
From @zoffixznetAnother case that might benefit from being complained about with an error. Only the last capture is used: <Zoffix__> star: use Test; is-deeply ~('123456789foobarMEOWS'~~ /<(fo)> o <( ba)> r/), 'foba', 'case 3'; |
From @moritzJust as a historical perspective, failed matches used to be Match objects where .from > .to, and iirc NQP still does it that way. When funny placement of )> and <( tricks the regex engine into such cases. Maybe a sane-ish approach would be to change <( to only ever increase .from, and )> to only decrease .to. A static compile-time error would be nice too, but I guess it won't be able to capture all cases, like when <( and )> are only used in some branches of an a conjunction or disjunction. |
Migrated from rt.perl.org#131247 (status was 'open')
Searchable as RT131247$
The text was updated successfully, but these errors were encountered: