REGEX-Escape for: user-agent: [Apache-HttpClient/4.5.7 (Java/1.8.0_221)]

Your Input:
Result, the escaped string:
user\-agent\: \[Apache\-HttpClient\/4\.5\.7 \(Java\/1\.8\.0_221\)\]


Ads

What must the escaping look like for:
user-agent: [Apache-HttpClient/4.5.7 (Java/1.8.0_221)]

The excaped text for use in a regex is:

user\-agent\: \[Apache\-HttpClient\/4\.5\.7 \(Java\/1\.8\.0_221\)\]


Ads