TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   Cleaning results from dict://dict.org/ (http://www.talkphp.com/general/3290-cleaning-results-dict-dict-org.html)

sidisinsane 08-26-2008 02:48 PM

Cleaning results from dict://dict.org/
 
I have implemented a dictionary search using the DICT protocol (dict://). The search-results are unformatted and I'm trying to clean them up.

I.e., the results retrieved from dict://dict.hewgill.com/ can be trimmed with this simple code:
PHP Code:

$results explode("\"en.wiktionary.org (brief)\""$string);
$new_string $results[1]; 

This does away with the first part but leaves me with some stuff at the end, that I would want to cut off as well. Everything I have tried using "$new_string" in the further process has failed, always returning an empty string.

For a closer look at what the returned results look like, try a dictionary search on Boldeagle's Lifestream - Always in search of spinless (not 'spineless') information (search for "freedom" i.e.).

Some regex experts here perhaps who could help?


All times are GMT. The time now is 03:27 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0