REGEX-Escape for: SELECT id, name, surname, username, created_at, updated_at FROM users WHERE id = $1;

Your Input:
Result, the escaped string:
SELECT id, name, surname, username, created_at, updated_at FROM users WHERE id \= \$1;


Ads

What must the escaping look like for:
SELECT id, name, surname, username, created_at, updated_at FROM users WHERE id = $1;

The excaped text for use in a regex is:

SELECT id, name, surname, username, created_at, updated_at FROM users WHERE id \= \$1;


Ads