Account for regex special characters in the invocation pattern.