regular expressions (maybe) :-)

From: Date: Fri, 03 Nov 2000 23:43:07 +0000
Subject: regular expressions (maybe) :-)
Groups: php.general 
Request: Send a blank email to php-general+get-23660@lists.php.net to get a copy of this message
Hello world, I need to know how many 'stole[number goes here]'s are in a string. I have no idea how to do this, but I suspect it might involve regular expressions. Regular expressions make my head spin. I don't even know if I am on the right track. If you would please help me by telling me what I could use, I would be very grateful. An example of a string I might have would be $string = "stole1 & stole2 & stole3 & stole4 & stoled1"; What ever happens, somehow, I would like to end up with 4 because I am only looking for stole and a number. stoled and a number should be different. Thank you very much. I appreciate it a lot. Jeff

« previous php.general (#23660) next »