Jonathan Nichols wrote: > >> >> But that's not the format, there's nothing between the / and the >> geocities. >> >> Try this regex instead: >> >> /^http:\/\/geocities\.yahoo\.com\.br\b/i > > > Cool, I shall try that. Thanks! For some reason, I thought one had > www.geocities.yahoo.com.br in it, but I could be mistaken. >
Well then you can stick (?:www\.)? in between the / and geocities. However, the original code would require the . and at least one letter, so it would never match one that didn't have any prefix. /^http:\/\/(?:www\.)?geocities\.yahoo\.com\.br\b/i