Switched 'regex' to 'pattern' in method names for clarity