fix regular expressions