| Author |
A little regex help?
|
|
| Ivan Marsh 2007-03-27, 7:00 pm |
| Man I suck at regex.
How do I write a regex that matches http://att.com and http://www.att.com
but doesn't match http://matt.com or http://www.bratt.com?
I'm trying to create a whitelist but I keep ending up with sites I don't
want matching my criteria.
I just can't seem to get my head around it.
Any help would be appreciated.
| |
|
| On Mar 27, 12:33 pm, Ivan Marsh <anno...@you.now> wrote:
> Man I suck at regex.
>
> How do I write a regex that matcheshttp://att.comandhttp://www.att.com
> but doesn't matchhttp://matt.comorhttp://www.bratt.com?
>
> I'm trying to create a whitelist but I keep ending up with sites I don't
> want matching my criteria.
>
> I just can't seem to get my head around it.
>
> Any help would be appreciated.
check out the following site. It helped me out a lot.
http://www.anaesthetist.com/mnm/perl/regex.htm
| |
|
|
| anthony 2007-03-30, 7:59 am |
| scripts.contact wrote:
> On Mar 27, 10:33 am, Ivan Marsh <anno...@you.now> wrote:
>
>
> /^http:\/\/(w{3}\.)?att\.com/i
I highly recommend the following app, it helped me a lot in allowing to
paste in text and then check regex expressions against the text quickly:
http://weitz.de/regex-coach/
|
|
|
|