Change regex string to regex pattern configuration