Heero Posted April 29, 2007 Share Posted April 29, 2007 Hi all, I was using the preg_match function like this: echo preg_match("//i", "\"Yes\""); And this turns out to return 1 indicating that there is a match...but it's not what I want. If the string is empty then it shouldn't be returning true for a match with the string Yes.. I was wondering whether there were any other modifiers like the /i modifier that could solve this problem? I could use an if statement to first check if the string was empty, but that seems pointless. Any suggestions? Link to comment https://forums.phpfreaks.com/topic/49159-preg_match-function/ Share on other sites More sharing options...
Heero Posted April 30, 2007 Author Share Posted April 30, 2007 Anyone have any ideas? Link to comment https://forums.phpfreaks.com/topic/49159-preg_match-function/#findComment-241292 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.