While piglet will NOT support capture groups (simply because there is no reason to do so in a lexer) it would be good idea to not choke on the very common syntax of (? to make a non-capturing group. In essence, we want to ignore this syntax since the behaviour it gives is exactly the same as our default behaviour.
There might also be more of these syntax tricks that we can make the regex engine "compatible" with so that it becomes easier to copy-paste expressions from the web.
Actually, I am not going to fix this. Regular expression syntax is not a standardized thing, and it's OK to be different. Better write something explaining piglets behaviour.
While piglet will NOT support capture groups (simply because there is no reason to do so in a lexer) it would be good idea to not choke on the very common syntax of (? to make a non-capturing group. In essence, we want to ignore this syntax since the behaviour it gives is exactly the same as our default behaviour.
There might also be more of these syntax tricks that we can make the regex engine "compatible" with so that it becomes easier to copy-paste expressions from the web.