How can I check to see in a string has a "\" in it using preg_match()? Thanks.
buummppp
<?php if (preg_match("\\", $string)) { echo "A match was found."; } else { echo "A match was not found."; } ?>
Try that, no refund or functionality quarantee :queasy:
Nope, doesn't work
try referring to it's ASCII code equivelant?
www.asciitable.com
"/\\/"
(I tried to explain it the way I understand it on http://www.tote-taste.de/X-Project/regex/syntax.html#2.2.1)
if (strpos($str, "\\") !== false) { //$str has a '\\' character in it } else { //$str does not have a '\\' character in it }