RE: [PHP] Can someone help me build a regular expression?

From: Date: Mon, 02 May 2005 23:12:39 +0000
Subject: RE: [PHP] Can someone help me build a regular expression?
Groups: php.general 
Request: Send a blank email to php-general+get-214354@lists.php.net to get a copy of this message
Thanks to all that posted with help. I've got a book about regular expressions but it's all very new to me. -----Original Message----- From: Jason Sweeney [mailto:jason@designshift.com] Sent: Monday, 2 May 2005 9:50 PM To: Matthew Western, IT Support, Lonsdale Cc: php-general@lists.php.net Subject: Re: [PHP] Can someone help me build a regular expression? Give this a shot: ^[0-9]{2,3}\.[0-9]$ Returns regex that begins with 2-3 digits, followed by a period, and ends with one digit. jason sweeney jason.designshift.com mwestern@sola.com.au wrote: > Hi All, > > I've sucessfully got a JavaScript validating some text boxes to make > sure that only numbers exist. I cheated and downloaded a regular > expression someon else had used and that works nicely. I wish to > validate the text box in the format of: > > xXX.X > > With the upper case Xs being a required number and the lower case x > being allowed but not needed. > > Can anybody help me? > > Ta > Matthew > > > > > > >

« previous php.general (#214354) next »