Two tips for regex usage:
- you're working with non-utf8 bytes,
[u8]; look at the bytes submodule in the Regex crate. This will avoid a bunch of the mess inside each match arm that's trying to conver to strings and back.
- avoid compiling the regex each time around the loop, using the
lazy_static! method noted in the regex docs.
Two tips for regex usage:
[u8]; look at thebytessubmodule in theRegexcrate. This will avoid a bunch of the mess inside each match arm that's trying to conver to strings and back.lazy_static!method noted in the regex docs.