When enabled, the parser will permit the construction of a regular expression that may match invalid UTF-8. When disabled (the default), the parser is guaranteed to produce an expression that will only ever match valid UTF-8 (otherwise, the parser will return an error). Perhaps surprisingly, when invalid UTF-8 isn't allowed, a negated ASCII word boundary (uttered as `(?-u:\B)` in the concrete sy
(&mut self, yes: bool)
| 93 | /// the parser to return an error. Namely, a negated ASCII word boundary |
| 94 | /// can result in matching positions that aren't valid UTF-8 boundaries. |
| 95 | pub fn allow_invalid_utf8(&mut self, yes: bool) -> &mut ParserBuilder { |
| 96 | self.hir.allow_invalid_utf8(yes); |
| 97 | self |
| 98 | } |
| 99 | |
| 100 | /// Enable verbose mode in the regular expression. |
| 101 | /// |