Little fixes on regex utils