DuckDuckGo Regex Search
duckduckgo.com
duckduckgo.com
It is a way of taking a regular expression and an input and then applying that regular expression to that input. In this particular example it takes the regular expression:
/(?x: (\w+) \s (\w+) )/
And applies it to:
"hacker news"
And then spits out the result:
"hacker | news"
Representing the two captured results.
In this case, 'x' means "Extend your pattern's legibility by permitting whitespace and comments"
>"x modifier: extended. Spaces and text after a # in the pattern are ignored" //
The other explainers I had to hand failed and/or called it an error.
Wake me when someone does this properly. It's only been done on a small scale or with very limited precomputed expressions, to my knowledge. Not many people would need it, but for those people it'd be insanely useful. But it's also insanely computationally hard - which means it'd be a really interesting technical achievement! There are no general-purpose reverse indexes that I know of that accelerate that as easily as keywords, but there are some data structures that might help a bit, although I can't think of practical ways to deploy them over arbitrary regexps specified at runtime! Plus some sanity heuristics and limits, of course, as regexps can undergo combinatorial explosion and some fun unexpected worse-case performance.
http://www.michaelnielsen.org/ddi/how-to-crawl-a-quarter-bil...
This is also useful.
I'm sure there's something positive in here if you look hard enough.
[1] https://duckduckgo.com/?q=regex+%2F%28%5Cw%2B%29+%5Cs+%28%5C...
Should return aaab right? But im getting some different stuff.
I coded a regex (domain) search engine recently, and it looks like this:
http://namegrep.com/#hacker%28news%29%3F%7C.combinator
/end shameless plug/
What DuckDuckGo is doing seems just like basic regex evaluation.