Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: PCRE access map mistake

From: Stan Hoeppner (stanhardwarefreak.com)
Date: Fri Sep 24 2010 - 05:31:15 CDT

Michael Orlitzky put forth on 9/23/2010 8:37 PM:

> # sutton-partners.com
> /^64\.191\.79\.245$/ public_rbls
> # mabel.ca
> /^70\.38\.108\.42$/ public_rbls
> # dsnews.com
> /^209\.172\.40\.21[157]$/ public_rbls

Should the carat and dollar be there? I just did some tests with


as the input string to postmap -q using your expressions above, and it
doesn't match. According to:

^ and $ tell the engine to match your expression at the first and last
position after a line break. In this case, if what Sahil posted is
correct, then the first will be part of a host name and the last will be
a closing bracket.

I'm thinking you need to ditch ^ and $ because what you're attempting to
match with your regex isn't at the beginning or end of a line.