Thread: Reg Exp Help
View Single Post
Old 20-04-2004, 12:51   #1 (permalink)
beseku
Senior Member
 
Join Date: Jun 2003
Location: Exmouth Market, London
Posts: 100
Send a message via AIM to beseku Send a message via MSN to beseku Send a message via Yahoo to beseku
Reg Exp Help

Hi guys,

I really need some help creating or rather improving some reg exp stuff for my dissertation. I have just noticed I have not done this and don't have the time to do a lot of work on it. Any help would be massively appreciated.

I need to recognise upper and lower case variants of the same string.

Currently in php I have
Code:
$strKeywords = "color|COLOR|[^/]font|[^/]FONT|face|FACE|size|SIZE";

and then

Code:
if (ereg($strKeywords, $strLine)) {...

And need to know if there is any better way to implement that.

Also, in the same vein, can anyone give me a quick and dirty reg exp for a html hex colour?

Help much appreciated here,

Cheers.
__________________
ben.
http://www.beseku.com
  Reply With Quote