You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
regex has support for RegexBuilder::multi_line() (source here), would it be possible to add that here?
I think the implementation can be done with a simple transformation if full PCRE is enabled - ^ to (?<=^|\r\n|\n|\x0b|\f|\r|\x85) and $ to (?=$|\r\n|\n|\x0b|\f|\r|\x85)
The text was updated successfully, but these errors were encountered:
Hey! You can already get that behavior by starting your regex with (?m). A multi_line method would be convenient to match regex's API though. I've added a "help wanted" label to this issue if anyone wants to contribute that work.
Interesting, ?m seems not work, it will stop before the first line break even if I only use r".*"
let text = "hello\nworld";
let re = Regex::new(r"(?m)(.*)").unwrap();
let caps = re.captures(text).unwrap().unwrap();
dbg!(&caps);
dbg!(&caps.get(0).unwrap().as_str());
regex
has support forRegexBuilder::multi_line()
(source here), would it be possible to add that here?I think the implementation can be done with a simple transformation if full PCRE is enabled -
^
to(?<=^|\r\n|\n|\x0b|\f|\r|\x85)
and$
to(?=$|\r\n|\n|\x0b|\f|\r|\x85)
The text was updated successfully, but these errors were encountered: