in reply to Re^4: Looking for ideas on how to optimize this specialized grep
in thread Looking for ideas on how to optimize this specialized grep
>> One thing I was unsure of, when you talk of "anchoring" your examples seem like that means using ^ or $ when I would think any static string (like "andrew\+") would count as an anchor in a regex?
Yes, absolutely. ^ and $ are common, but anything solid that isn't a pattern, e.g. both 'a' and 'b' in /a.+b/, could be called anchors. Also \G is an anchor when combined with /g, in a loop.