Bugfix: the pattern needs to be a regex pattern!