tidied up regexes