REGEX-Escape for: (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0

Your Input:
Result, the escaped string:
\(X11; Ubuntu; Linux x86_64; rv\:62\.0\) Gecko\/20100101 Firefox\/62\.0

Ads

What must the escaping look like for:
(X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0

The excaped text for use in a regex is:

\(X11; Ubuntu; Linux x86_64; rv\:62\.0\) Gecko\/20100101 Firefox\/62\.0


Ads