Re: ereg usage

From: Date: Sun, 16 Feb 2003 20:03:41 +0000
Subject: Re: ereg usage
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-135771@lists.php.net to get a copy of this message
The problem is that it's looking for hyphen, - , immediately preceeding the end. Remove the $. ----- Original Message ----- From: "Peter Gumbrell" <peter@orillia.net> To: "Php-General" <php-general@lists.php.net> Sent: Sunday, February 16, 2003 9:18 AM Subject: [PHP] ereg usage 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 peter@orillia.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#135771) next »