Yahoo! search interface: Difference between revisions
Content added Content deleted
Line 981: | Line 981: | ||
The following gives us a shell utility which we can invoke with arguments like "rosetta 0" to get the first page of search results for "rosetta". |
The following gives us a shell utility which we can invoke with arguments like "rosetta 0" to get the first page of search results for "rosetta". |
||
The two arguments are handled as if they were two lines of text from a data source using @(next :args). We throw an exception if there is no match (insufficient arguments are supplied). |
The two arguments are handled as if they were two lines of text from a data source using @(next :args). We throw an exception if there is no match (insufficient arguments are supplied). The @(cases) directive has strictly ordered evaluation, so the throw in the second branch does not happen if the first branch has a successful pattern match. If the similar @(maybe) or @(some) directives were used, this wouldn't work. |
||
A little sprinkling of regex is used. |
A little sprinkling of regex is used. |