by pittsburgh · 15y ago · 0 comments
Since parsing regular expressions is so slow compared with performing an indexed search, it's difficult to think of a way to make that scale for a dataset as large as the public web. There's also the problem of having to protect against regex denial of service attacks: http://en.m.wikipedia.org/wiki/ReDoS
I've been able to (very partially) make up for the lack of regex support by taking advantage of Google's operators and wildcards:
http://www.googleguide.com/wildcard_operator.html
http://www.googleguide.com/advanced_operators.html
Some examples:
"solar|lunar eclipse 1700..1800"
"William * Clinton"
Columbus -Ohio -Georgia -Christopher
This is hardly a replacement for regex, but it's the best I've been able to come up with.No comments yet.