Hey Guys and Gals,
I have been trying to learn this regex stuff for ages and just can't seem to get it so i thought maybe practice some stuff, anyway the code shown below dont work and I am not sure why
what I was hoping to do since I was using the \W it should not match a word so my string contains number 1234 so it shoudl echo match found but it dont, any reasson why?PHP Code:<?php
/**
* @author Cobra Internet
* @copyright 2008
*/
$string = '1234';
$match = preg_match('/ (\W+) /', $string);
if($match == true) {
echo "We Have a Match";
} else {
echo "We dont have a mtach";
}
?>








Bookmarks