Given a character string, ensure this would function as a regular expression by escaping regex metacharacters which appear in the string.
Given a character string, ensure this would function as a regular expression by escaping regex metacharacters which appear in the string.