Use a Pattern instead of a regex string