Re: OT: Javascript regex Q
--- On Wed, 10/5/11, Darac Marjal <mailinglist@darac.org.uk> wrote:
> >
> > Is there a way to write a single Javascript regex that
> would match all of the following three patterns:
> >
> > a.domain.tld
> > b.domain.tld
> > domain.tld/c/
> >
>
>
> /.*/
>
> Or, perhaps you're after /domain.tld/
>
> Either should work, though I'd expect the first to be
> quicker in your case.
No, this isn't what I'm looking for. I'm not after blocking everything or the whole domain.tld, only the three above URI patterns.
I came across this trying to rewrite my ad blocking list in a more elegant way, but couldn't see any obvious way to make it with one regex without blocking more than necessary.
Thanks
Reply to: