Colin Guthrie wrote:
Allan Stirling wrote:
To find a program called 'New Yankee' (With a remote mapped 2abc 3def 4ghi 5jkl 6mno 7pqrs 8tuv 9wxyz 0space) the input would be
639092633, possibly refining the search as the input is being typed...




I said before the weekend (this idea was also mentioned by Ian Cambell in this thread last week), I used to have a C++ class that implemented this sort of searching based on a dictionary you load (e.g. all the words in the search space!! or /usr/share/dict/words).

Giving the class a number sequence as input, it would return all the words that begin with those letter combinations.

It worked quite well.

I said I'd try and dig it out (it was written about 3 or 4 years ago!) and slap up a few tests before integrating it into myth.
No real need, I think. Looking at this a little:

Looking for 'Alias' and typing just 2542 gives us what we want. 1 extra letter brings it down to 3 results.

mysql> select distinct title from program where title REGEXP '[2abc][5jkl][4ghi][2abc]';
+-----------------------------------------+
| title |
+-----------------------------------------+
| Accessories by Lusso Italia |
| Alias |
| Alias Ricky Gervais |
| Alice in Wonderland |
| Alice through the Looking Glass |
| Alice's Adventures in Wonderland |
| Australian Rugby League |
| Avventura - Journeys in Italian Cuisine |
| Bend it Like Beckham |
| Click Online |
| Extreme Australia |
| Giorgio Locatelli Pure Italian |
| Italian for Beginners |
| Malibu CA |
| Planed Plant:Asterix y Galiad |
| Prince Valiant |
| Public Accounts Committee |
| Scandalicious: Movie Awards |
| Spain and the Algarve Deals |
| Talia's Day Off |
| Tasting Australia |
| The Block Australia |
| The Falcon's Alibi |
| Top Ten Australia |
| Who Are the Beckhams? |
| Xcalibur |
+-----------------------------------------+
26 rows in set (0.23 sec)


I'm looking at this option now. REGEXP appears to go back to 3.2xish at least.

Cheers,

Allan.
_______________________________________________
mythtv-dev mailing list
[EMAIL PROTECTED]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to