Replace regexes with CompCore Patterns Class