REGEX-Escape for: UPDATE satellite SET distance=$1, message=$2, updated_at=$3 WHERE id=$4;

Your Input:
Result, the escaped string:
UPDATE satellite SET distance\=\$1, message\=\$2, updated_at\=\$3 WHERE id\=\$4;


Ads

What must the escaping look like for:
UPDATE satellite SET distance=$1, message=$2, updated_at=$3 WHERE id=$4;

The excaped text for use in a regex is:

UPDATE satellite SET distance\=\$1, message\=\$2, updated_at\=\$3 WHERE id\=\$4;


Ads