Hi Bo,
I am a bit behind with reading my email, so this solution
seems perfect, but I also want to learn something about
parse, so if you please could the parse version, too?
thanks
Ingo
Those were the words of Bohdan Bo Lechnowsky:
>
> Ingo,
>
> Assuming your input line looks like this:
>
Hi Ingo,
you wrote:
>Now here's a real life example ...
>
>Just a descriptive line that noone needs
>NOTU=6, NLOC=15, NALL=5;
>(fortran format string)
The following works rather painlessly. Is it possible to reduce the size
using parse? Hmmm, don't know!
data: {Just a descriptive line that noon
If you want control over whitespace as you parse, try using the "all"
refinement and including a whitespace charset in your parse pattern.
>> s-char: charset [#"^(line)" #"^(tab)" #" "]
== make bitset! #{
00060100
}
>> s: [s-char]
== [s-char
These cases might also be informative:
>> parse " the radio " ["the" "radio" any space]
== true
>> parse " the radio " [thru "the" "radio" to end]
== true
>> parse " the big radio " [thru "the" "radio" to end]
== false
Seems (to me) when there is no space following "radio" (in the string be