Re: [PHP] ereg usage

2003-02-16 Thread Rick Emery
The problem is that it's looking for hyphen, - , immediately preceeding the end. Remove the $. - Original Message - From: "Peter Gumbrell" <[EMAIL PROTECTED]> To: "Php-General" <[EMAIL PROTECTED]> Sent: Sunday, February 16, 2003 9:18 AM Subject: [P

Re: [PHP] ereg usage

2003-02-16 Thread Ernest E Vogelsinger
At 16:18 16.02.2003, Peter Gumbrell said: [snip] >Could someone please tell me why this code is not working: > >ereg ('^[A-H]*([0-9]+)-$', $rank, $matches); >$workshop_ID = $matches[1][2}; > >where $rank is something like C12-1 and I just need the C12 par

[PHP] ereg usage

2003-02-16 Thread Peter Gumbrell
Could someone please tell me why this code is not working: ereg ('^[A-H]*([0-9]+)-$', $rank, $matches); $workshop_ID = $matches[1][2}; where $rank is something like C12-1 and I just need the C12 part. Many thanks Peter Gumbrell [EMAIL PROTECTED] -- PHP General Mailing List (http://www.ph