Regex tests
Various fixes