Hello,


I'm in the process of uploading two new scripts to rebol.org

%split-text.r
(there might allready be such a 'func, but I havn't found it ;)

splits a string into substrings, example:

## text: {This "is a text" with :quotes: and 1 number}
== {This "is a text" with :quotes: and 1 number}
## print mold split-text text
["This" "is" "a" "text" "with" "quotes" "and" "1" "number"]
## print mold split-text/valid text [#"0" - #"9"]
["1"]
## print mold split-text/valid text complement charset {:}
[{This "is a text" with } "quotes" " and 1 number"]

(inspired by the "parse with quotes" thread, and by some trouble I had
myself with splitting a text-file containing quotes into words)


%do-example.r

DOes a file (or url) and afterwards DOes the example string.

Really simple, but quite handy as you can built test-code directly into
the script header and just 'do-example it instead of 'do



Best regards
Thomas Jensen

Reply via email to