say "Cool" ~~ /* /; # 「Cool」
say "Cześć" ~~ m:ignoremark/ Czesc /; # 「Cześć」
say "WEIẞE" ~~ m:ignorecase/ weisse /; # 「WEIẞE」
say "หนูแฮมสเตอร์" ~~ /+/; # 「หนูแฮมสเตอร์」Adding lookbehinds to rust-lang/regex
11–20 of 36 posts
Re: Adding lookbehinds to rust-lang/regex
#12It’s odd to see such a widely adopted language as Rust only just getting some regex basics. Whereas Raku ( https://raku.org ) has made a strong forward step in regex syntax over PCRE, made by the same language designer with implementation of modern unicode savvy features like Grapheme and Diacritic handling that are essential to building consistent code to handle multilingual needs. say "Cool" ~~ / * /; # 「Cool」 say…
Re: Adding lookbehinds to rust-lang/regex
#13It’s odd to see such a widely adopted language as Rust only just getting some regex basics. Whereas Raku ( https://raku.org ) has made a strong forward step in regex syntax over PCRE, made by the same language designer with implementation of modern unicode savvy features like Grapheme and Diacritic handling that are essential to building consistent code to handle multilingual needs. say "Cool" ~~ / * /; # 「Cool」 say…
My main focus for the `regex` crate has been on performance: https://github.com/BurntSushi/rebar
How does Raku's regex performance compare to Perl?
Re: Adding lookbehinds to rust-lang/regex
#14It’s odd to see such a widely adopted language as Rust only just getting some regex basics. Whereas Raku ( https://raku.org ) has made a strong forward step in regex syntax over PCRE, made by the same language designer with implementation of modern unicode savvy features like Grapheme and Diacritic handling that are essential to building consistent code to handle multilingual needs. say "Cool" ~~ / * /; # 「Cool」 say…
Re: Adding lookbehinds to rust-lang/regex
#15From a user perspective, this is extremely valuable. What an amazing improvement; unbounded especially. I do hope this would make it into actual RE2 & go. When I use regex, I expect to be able to lookbehind, so I am routinely hit by RE2's limitations in places where it's used. Sometimes the software uses the entire matched string and you can't use non-capturing groups to work around it. I understand go's reasons, ReD…
> the "purism" of RE2 does fly in the face of practicality to an irksome degree
It’s not purism tho. There are very practical reasons to want an FA-based engine, and if you compromise that to get additional features then the engine is pointless, you could have just used a backtracking engine in the first place.
Re: Adding lookbehinds to rust-lang/regex
#16It’s odd to see such a widely adopted language as Rust only just getting some regex basics. Whereas Raku ( https://raku.org ) has made a strong forward step in regex syntax over PCRE, made by the same language designer with implementation of modern unicode savvy features like Grapheme and Diacritic handling that are essential to building consistent code to handle multilingual needs. say "Cool" ~~ / * /; # 「Cool」 say…
Re: Adding lookbehinds to rust-lang/regex
#17It’s odd to see such a widely adopted language as Rust only just getting some regex basics. Whereas Raku ( https://raku.org ) has made a strong forward step in regex syntax over PCRE, made by the same language designer with implementation of modern unicode savvy features like Grapheme and Diacritic handling that are essential to building consistent code to handle multilingual needs. say "Cool" ~~ / * /; # 「Cool」 say…
It's not only just getting some "regex basics." The `fancy-regex` crate has provided look-behind for years. The OP is about adopting look-behind to the linear time guarantee required by the `regex` crate. My main focus for the `regex` crate has been on performance: https://github.com/BurntSushi/rebar How does Raku's regex performance compare to Perl?
Making sure this line isn't glossed over: the point of the regex crate is that it provides linear-time guarantees for arbitrary regexes, making it safe (within reason) to expose the regex engine to untrusted input without running the risk of trivial DoS. From what I can tell, supporting lookbehinds in such a context is something that researchers have only recently described.
Re: Adding lookbehinds to rust-lang/regex
#18From a user perspective, this is extremely valuable. What an amazing improvement; unbounded especially. I do hope this would make it into actual RE2 & go. When I use regex, I expect to be able to lookbehind, so I am routinely hit by RE2's limitations in places where it's used. Sometimes the software uses the entire matched string and you can't use non-capturing groups to work around it. I understand go's reasons, ReD…
Re: Adding lookbehinds to rust-lang/regex
#19It’s odd to see such a widely adopted language as Rust only just getting some regex basics. Whereas Raku ( https://raku.org ) has made a strong forward step in regex syntax over PCRE, made by the same language designer with implementation of modern unicode savvy features like Grapheme and Diacritic handling that are essential to building consistent code to handle multilingual needs. say "Cool" ~~ / * /; # 「Cool」 say…
I don't think Philip Hazel, who wrote PCRE, has anything to do with perl or raku development.
my main point is that PCRE was based on perl regexes and that these were designed by Larry Wall and so he had some experience when it came to the strengths and weaknesses of of perl RE when it came to designing the Raku RE syntax (ie. the language formerly known as Perl 6)
Re: Adding lookbehinds to rust-lang/regex
#20From a user perspective, this is extremely valuable. What an amazing improvement; unbounded especially. I do hope this would make it into actual RE2 & go. When I use regex, I expect to be able to lookbehind, so I am routinely hit by RE2's limitations in places where it's used. Sometimes the software uses the entire matched string and you can't use non-capturing groups to work around it. I understand go's reasons, ReD…