Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • I'm a bit confused, so you're trying to match either "CAT" or any number of digits from $_POST['number']? What do you want returned if a) x number of digits are matched c) CAT is matched? Commented Nov 19, 2009 at 11:29
  • Sorry I did not clarify, I just split the form into two chunks one for the digits to be matched via regex that uses the variable number and the other form uses the variable string to regex match CAT, sorry about that. I only posted one aspect of the code. Commented Nov 19, 2009 at 11:54