Recognize regex-like strings and convert to actual RegExp