fixed bugs in regular expressions #2