Re: [PHP] Need help with a regular expression

2004-09-30 Thread Alex Hogan
[snip] "^Q4_[0-9]$" & Yes, your understanding of "^Q4_.[0-9]$" is wrong. [/snip] Thanks guys.., I did take the '.' out of the expression, but I also had to change the way I was using it. I replaced; if($key == ereg( "^Q4_.[0-9]$", $key)){ with if(ereg( "^Q4_.[0-9]$", $key)){ alex hogan -- PHP

Re: [PHP] Need help with a regular expression

2004-09-30 Thread Ryan Dingman
On Sep 30, 2004, at 2:22 PM, Alex Hogan wrote: Is my ereg() wrong? My understanding is ereg("^Q4_.[0-9]$", $key) should look for a $key starting with 'Q4_' followed by a single number and place those values into an array named $Q4scores. Yes, your understanding of "^Q4_.[0-9]$" is wrong. This says

Re: [PHP] Need help with a regular expression

2004-09-30 Thread Jason Wong
On Friday 01 October 2004 05:22, Alex Hogan wrote: > if($key == ereg("^Q4_.[0-9]$", $key)){ "^Q4_[0-9]$" -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development *

[PHP] Need help with a regular expression

2004-09-30 Thread Alex Hogan
I have a series of questions that are multiple choice. Some of the questions have multiple answers to them. Those questions have answers that are indicated by a checkbox that is named something like; Q4_1 Q4_2 etc... Of those, each one of the checkboxes that indicate a correct answer is given a