REGEX-Escape for: SELECT count(DISTINCT serialnumber) FROM end_user_device WHERE org_id = \\? AND...

Your Input:
Result, the escaped string:
SELECT count\(DISTINCT serialnumber\) FROM end_user_device WHERE org_id \= \\\\\? AND email \= \\\\\? AND serialnumber \= \\\\\?

What must the escaping look like for:
SELECT count(DISTINCT serialnumber) FROM end_user_device WHERE org_id = \\? AND email = \\? AND serialnumber = \\?

The excaped text for use in a regex is:
SELECT count\(DISTINCT serialnumber\) FROM end_user_device WHERE org_id \= \\\\\? AND email \= \\\\\? AND serialnumber \= \\\\\?


Ads