Old 20-04-2004, 11: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
Old 21-04-2004, 07:11   #2 (permalink)
smallbeer
I Ain't Losing Any Sleep™
 
Join Date: Apr 2003
Posts: 5,237
Could you not just use eregi as it's not case sensitive?

http://uk.php.net/manual/en/function.eregi.php
__________________
That's fuckin' ingenious, if I understand it correctly. It's a Swiss fuckin' watch.
  Reply With Quote
Old 21-04-2004, 07:28   #3 (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
Quote:
Originally Posted by smallbeer
Could you not just use eregi as it's not case sensitive?

http://uk.php.net/manual/en/function.eregi.php

I love you...
__________________
ben.
http://www.beseku.com
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8