I need to check some words with preg_match
. If the words contain numbers and .
, I want to echo "ok".
Lets say i want to ckeck this :
4814.84dszs //ok
412.84.61.412 //ok
hello.4you //ok
welcome.user //not ok
481221222 // not ok
I have used this:
if (preg_match('/^[0-9][.]+$/', 'MY_WORD_HERE'))
{
echo 'ok';
}
But it doesn't give me the exactly result which I looking for.