I agree that a regexp based solution would be more elegant. Perhaps this feature will be available sooner rather than later ...
As for your issue regarding the ' (apostrophe) char, there are certain chars that when specified in constants require escaping by preceding with a backslash.
Here's my previous example with the required corrections:
For best results, use the Firefox browser..