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

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

Ads

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

The excaped text for use in a regex is:

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


Ads