Name: Anonymous 2008-06-27 15:25
sup I need some help writing a regular expression.
I'm usin PHP and I need to count how many times a certain string occurs, so I need to use preg_match_all instead of ereg, and I hate perl regular expressions.
How can I match a string like !blah!bla!2342
so that it gets "blah", "bla", and "2342". I can get it to get all after the first !, but it doesn't seem to stop before the second ! (greedy ".")?
I'm usin PHP and I need to count how many times a certain string occurs, so I need to use preg_match_all instead of ereg, and I hate perl regular expressions.
How can I match a string like !blah!bla!2342
so that it gets "blah", "bla", and "2342". I can get it to get all after the first !, but it doesn't seem to stop before the second ! (greedy ".")?