fix parsing of regex option