[REBOL] Re: 'extract - reply to Andrew
From: al::bri::xtra::co::nz at: 18-Dec-2000 7:42
Spliff wrote:
> I disagree. Your example makes too many assumptions about the input
string. Particularly it assumes that the author of the original source was
kind enough to use elegant spacing and rebol conventions.
> source: "User1234<WON:387463>202.76.345.2" ;This string contains several
discreet integers!
I could suggest that:
202.76.345.2
is a tuple, not a integer. Or it could be:
202.76°C
and:
345.2°C
with a mistakenly typed "." instead of a comma. Or it could be:
202.76°F
to:
345.2°F
and intended to be a range of temperatures, but the keyboard stuck on
the second ".".
This could be a tag!:
<WON:387463>
in HTML or XML.
This could be formula (less than or '<), written without spaces:
1234<WON:387463
with a set-word inbetween.
The point is that using 'parse with suitable rules and 'load if necessary,
is a better solution to the larger problem, you're trying to solve. The
larger problem being understanding the special dialect that the human being
has used or intended to use.
I hope that helps!
Andrew Martin
ICQ: 26227169 http://members.nbci.com/AndrewMartin/