5 ms·
DuckDuckGo Regex Search
- deleted 12y ago[deleted]
- dedosk 12y agoGoogle does not implement regex search support because they said somewhere that the data storage needed for the index would be huge. And since regex search is used only by a small subset of users, it is not worth the effort.
- enesunal 12y agoactually they can support only for some computer-related domains such as stackoverflow etc.
- f055 12y agoMore likely, regex search has the power only allowed in the paid Google Search API. And Google knows the value of its search data.
- przemoc 12y agoIIRC "security" plays important role here too, because using regexps you can much easier find sensitive data, or to be precise: context (neighborhood) of sensitive data.
- mike-cardwell 12y agoThis does not do what you think it does. It takes a regular expression and an input and applies that regular expression to that input. It doesn't search the web using the regex.
- gmu3 12y agoI would guess that small subset of users is a big subset of users that use DDG.
- itry 12y ago/a{2,2}b/ Should return aaab right? But im getting some different stuff.
- TimWolla 12y agoIt should be aab.
- deleted 12y ago[deleted]
- mike-cardwell 12y agoThis does not do what you think it does. Take a second to look at the link.
- mike-cardwell 12y agoEvery comment here at time of writing is from people thinking that this is a way of searching the web using regular expressions. It is not. 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.
- Illniyar 12y agoWhat is the use for this?
- mike-cardwell 12y agoTesting regular expressions
- oneeyedpigeon 12y agoThank you. Can you explain what "?x:" does? Searching for regular expressions syntax (another thing this doesn't do) is quite tricky.
- joosters 12y agoIt's another way of specifying a regular expression modifier, normally given at the end of a regex. In this case, 'x' means "Extend your pattern's legibility by permitting whitespace and comments"
- pbhjpbhj 12y agohttp://regex101.com/ http://regex101.com/ tells me: >"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.
- squeaky-clean 12y agoIt depends on the flavor of regex being used. Try switching regex101 to JS or PY mode, and you'll see that the x modifier isn't supported.
- gulbrandr 12y agohttps://duckduckgo.com/?q=regex https://duckduckgo.com/?q=regex This is also useful.
- pbhjpbhj 12y agoDoesn't appear to work for me .. is this supposed to be doing a regex search or just solving; doesn't seem to solve generally?
- oneeyedpigeon 12y agoIt does; try: https://duckduckgo.com/?q=regex+%2Fhack%2F+hacker+news https://duckduckgo.com/?q=regex+%2Fhack%2F+hacker+news https://duckduckgo.com/?q=regex+%2F%28hack%29%2F+hacker+news https://duckduckgo.com/?q=regex+%2F%28hack%29%2F+hacker+news
- oneeyedpigeon 12y agoAlthough, admittedly, this [1] doesn't do what I'd expect it to. [1] https://duckduckgo.com/?q=regex+%2F%28%5Cw%2B%29+%5Cs+%28%5Cw%2B%29%2F+hacker+news https://duckduckgo.com/?q=regex+%2F%28%5Cw%2B%29+%5Cs+%28%5C...
- xg15 12y agoSo, why again do we need a cloud service to test a regular expression?
- elmindreda 12y agoI guess it's too much work to start a REPL.
- AlyssaRowan 12y agoAwwww. I hoped for a moment it was literally searching the web with a regex. Unfortunately no, although it may be a handy regex cheat sheet. 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.
- unhappyhippie 12y agoMaybe I am missing out potential applications but I can't understand why I would like to search the entire web with a regex pattern? Find all strings that could be SSNs?
- BenoitP 12y agoFor 580$, you can still do it: http://www.michaelnielsen.org/ddi/how-to-crawl-a-quarter-billion-webpages-in-40-hours/ http://www.michaelnielsen.org/ddi/how-to-crawl-a-quarter-bil...
- gpvos 12y agoOh wait, I have to look at the text in the small grey bar above, and not at the list of search results. Still pretty non-obvious.
- mykhal 12y agos/Search/Eval/
- alixaxel 12y ago/shameless plug/ I coded a regex (domain) search engine recently, and it looks like this: http://namegrep.com/#hacker%28news%29%3F%7C.combinator http://namegrep.com/#hacker%28news%29%3F%7C.combinator /end shameless plug/ What DuckDuckGo is doing seems just like basic regex evaluation.
- hackuser 12y agoDoes anyone provide Boolean web searches, with nested terms (e.g., "a AND (b OR (c AND d))"? I don't need it all the time but it would be very handy on occasion.
- lalaqpqp 12y agoAs all applications turn into web applications, all one-liners you should be able to knock out in the shell become search engine extensions. I'm sure there's something positive in here if you look hard enough.