Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
PHP, regex and double quoted strings are fun...
/* This handy script lets you locate escaped backslashes in the prettiest way. */
$input = $_POST['value'];
$matches = array();
if (preg_match("/\\\\/", $input, $matches)) {
} else {
echo "No matching \"\\\\\"'s found.";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment