Jump to content

preg_match


dreamwest

Recommended Posts

Im trying to match this string, but i dont wat to match normal words like "hello world 646"

 

$string = "2ab055843241f20044af82ae0d5ace04"; //always over 15 chars - without spaces

if ( preg_match('~^[0-9\s]+$~D', $string)) {
echo 'yes';
}

 

If i can do it with preg_match that would be great

Link to comment
https://forums.phpfreaks.com/topic/214077-preg_match/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.