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 that you are looking for a string with the following properties:
1. Anchored at the beginning 2. Begins with "Q4_" 3. Followed by any single character (except newline) 4. Followed by any single digit 5. Anchored at the end
If you remove the "." in the middle of your pattern, you should get what you are looking for.
Hope this helps.
ryan
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php