[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Mobile phone numbers
Close, but there are a couple problems: - You should use parentheses instead of angle brackets - The + needs to be escaped - I'm assuming it's the group "04" that's optional, not just the "4". So you have to put the 04 in parentheses. Likewise for the +614. - There seem to be 8 digits after the +614 number, not 7. Try this: ((04)?[0-9]{8}) | ((\+614)?[0-9]{8}) I think that should work. Priscilla ----------------------------------------------------------- Priscilla Walmsley priscilla@w... Architect, Vitria Technology http://www.vitria.com Author, Definitive XML Schema (Prentice Hall, Dec. 2001) ----------------------------------------------------------- > -----Original Message----- > From: topper harley [mailto:bicepmaximus@h...] > Sent: Friday, September 07, 2001 1:40 AM > To: xml-dev@l... > Subject: Mobile phone numbers > > > Hi, > i wanted to write a pattern value string that reads in > a mobile phone > number of the pattern 0412867576 or +61412867576 only. At > the moment i am > using this check > > <xsd:simpleType name="Mobile"> > <xsd:restriction base="xsd:string"> > <xsd:pattern value="<04?[0-9]{8}> | <+614?[0-9]{7}>"/> > </xsd:restriction> > </xsd:simpleType> > > is this correct or any help would be great! > > Topper > > > _________________________________________________________________ > Get your FREE download of MSN Explorer at > http://explorer.msn.com/intl.asp > > > ----------------------------------------------------------------- > The xml-dev list is sponsored by XML.org <http://www.xml.org>, an > initiative of OASIS <http://www.oasis-open.org> > > The list archives are at http://lists.xml.org/archives/xml-dev/ > > To subscribe or unsubscribe from this elist use the subscription > manager: <http://lists.xml.org/ob/adm.pl> >
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|