Jump to content

find exact word


mysterbx

Recommended Posts

hola,

 

what delimeter should i use to find an exact word in a pettern..

 

example:

$pass = "login";
if(preg_match("#(login|register|signup)#", $pass, $passwordcheck2)) { echo "do somethin"; }

 

the preg match would find a match

 

example #2 (preg match should find a match)

 

$pass = "loginregister";
if(preg_match("#(login|register|signup)#", $pass, $passwordcheck2)) { echo "do somethin"; }

Link to comment
https://forums.phpfreaks.com/topic/90699-find-exact-word/
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.