I have a question about how regular expressions and PHP may be able to count the number of successful matches and output it or only do something once a minimum number of matches are found.
I am aware of a way of limiting a regular expression using something like {2,5} but I cannot get that to work, so I suppose that my only option is to use some sort of if statement that counts the number of matches from the regular expression and then does something if that number meets or exceeds what I specify.
But how do I get that magic number?



Reply With Quote


Bookmarks