AUTHOR

SPUTNIK

How's your regex-foo?
You other seven people viewing this thread are also welcome to chime in.
my regex is irate as fuk-bar
srsly? I only ever use 'em to do simple matching on BGP paths, and I've never had to dig too deep.

nah, i just wanted your thread to contain foo bar Smiley
but what i want to do is have something that will match

mydomain.com
mydomain.ca
www.mydomain.com
www.mydomain.ca

so something like

(www)(\.)mydomain(\.)(com|ca)

but with a few question marks or something?
oh you cock sucker
Oh I see what you're doing. LMGTFY

hold up, brah.
(www\.)?mydomain\.(com|ca)

might do it, maybe
yah, pretty sure that did it
I, yeah. If I'm understanding my frantic googling.
yah, it's working great. We have a lot of domains parked with host records that point to the same webpage.

so mydomain and mydomain2 and mydomain3 all resolve to the same address, but it fucks up the HTTP referrer in some places, so the logs will show the page referrer as being our own site, which isn't terribly interesting.

i just wanted to filter out all those instances to get a better grasp of where people were actually coming in.
ended up looking like

(www\.)?(mydomain|(optionalappendage)?mydomain2|mydomain3|mydomain4)\.(com|ca|tv|mobi)

in cause you're curious
Actually, I am, because I hate seeing myself refer to myself. Smiley
RonTeflon quote:
ended up looking like

(www\.)?(mydomain|(optionalappendage)?mydomain2|mydomain3|mydomain4)\.(com|ca|tv|mobi)

in cause you're curious
thanks for posting that out. I was curious.
that optional thing is in there because i needed to match

dik.com or dik.ca or www.dik.com etc,

as well as disdik.com, www.disdik.mobi...
i love it when a thread comes together
I was going to ask about (optionalappendage)

so basically any iteration of *dik*

bigdik
blackdik
disdik
mydik
herdik
well in my case i needed it to specifically match dik or disdik, so in the regex it just looks like (dis)?dik

Quick reply

Sign in to post a message.
Smileys

Times shown in Eastern Time (ET).