This way regex matching is also generalized over different input types, which is also in line with the rest of nom. For example, you can have regex matching for both &str and &[u8]
This is great, thank you very much! Doing it this way wouldn’t have occured to me.
EDIT: I think the polymorphism isn’t quite that simple because Regex can’t match both &str and &[u8]. There are two different Regex types for that, right?