On Sat, 25 Oct 2014, Martin Gregorie wrote:

On Fri, 2014-10-24 at 19:48 -0400, Daniel Staal wrote:

If it does it's behaving oddly.  Still, I might try this instead:

      uri      __MG_LTD1   /\.link\b/i

That should be faster and more general than the second one above, and
shouldn't grab linkedin either.

The problem is that it won't match URIs of the form

  example.link/path/to/badness

which are fairly common in body URIs. Does \b match end of string? That
never occurred to me. I've always used $ to do that and it certainly
works as part of a URI rule.

No, \b matches the transition from a word-character (\w, [0-9a-z_]) to a non-word character (anything else, plus beginning and end of line).

Think "\b = Boundary".

--
 John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
 jhar...@impsec.org    FALaholic #11174     pgpk -a jhar...@impsec.org
 key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
  ...to announce there must be no criticism of the President or to
  stand by the President right or wrong is not only unpatriotic and
  servile, but is morally treasonous to the American public.
                                          -- Theodore Roosevelt, 1918
-----------------------------------------------------------------------
 876 days since the first successful private support mission to ISS (SpaceX)

Reply via email to