[thelist] REGEX problem

Maximillian Schwanekamp anaxamaxan at neptunewebworks.com
Fri Feb 27 14:37:59 CST 2004


I'm no regex guru, but shouldn't you escape that - with a \ ?? iirc - is a
special char in regexps.

Maximillian Von Schwanekamp
Websites for Profitable Microbusiness
NeptuneWebworks.com
voice: 541-302-1438
fax: 208-730-6504


-----Original Message-----
From: The Lists [mailto:thelists at antonakis.co.uk]
Sent: Friday, February 27, 2004 12:34 PM
To: thelist at lists.evolt.org
Subject: [thelist] REGEX problem


Hi,

I want to include the minus symbol as a required character in a REGEX
expression, but am stumped as to how to do it..any suggestions?

So far I have come up with: ereg("C-[A-Z]{4}|CF-[A-Z]{3}",$data) but it
doesn't work. I know I have to change the way I have displayed the minus
symbol, but I don't know what.

I want to allow items like:
C-ABCD and CF-GHI

Cheers
Alexis


--
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !






More information about the thelist mailing list