REGEX-Escape for: /^(100(\.0{1,2})?|[1-9]?\d(\.\d{1,2})?)$/

Your Input:
Result, the escaped string:
\/\^\(100\(\\\.0\{1,2\}\)\?\|\[1\-9\]\?\\d\(\\\.\\d\{1,2\}\)\?\)\$\/


Ads

What must the escaping look like for:
/^(100(\.0{1,2})?|[1-9]?\d(\.\d{1,2})?)$/

The excaped text for use in a regex is:

\/\^\(100\(\\\.0\{1,2\}\)\?\|\[1\-9\]\?\\d\(\\\.\\d\{1,2\}\)\?\)\$\/


Ads