Function scan_rules::scanner::re
[−]
[src]
pub fn re<Then>(s: &str, then: Then) -> ScanRegex<Then>
Creates a runtime scanner that extracts a slice of the input using a regular expression, then scans the result using Then
.
If the regular expression defines a group named scan
, then it will extract the contents of that group. Failing that, it will use the the first capturing group. If there are no capturing groups, it will extract the entire match.
Irrespective of the amount of input provided by the regex scanner to the inner scanner, the regex scanner will only consume the portion that the inner scanner did.
See: regex
crate, re_a
, re_str
.