Forum Moderators: DixonJones

Message Too Old, No Replies

Pattern matching a domain from referral info

i need to remove everything after the tld

         

lethal0r

11:16 am on May 31, 2006 (gmt 0)

10+ Year Member



im a barney rubble with this kind of thing, will this work:

[[^...]

i want to match http:// followed by any number of characters up until the next forward slash.

Thanks

Tom

coopster

2:36 pm on May 31, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Looks right to me, except if you are trying to capture the subpattern you will need parentheses surrounding the captured pattern.
http://([^/]*)