I discovered a common need that the rebol 'parse, 'find and 'load
functions don't easily solve. That is to search a string! or block! for
a value of a particular datatype!. I think rebol needs a new native (or
mezzanine) function which I like to call 'extract:
USAGE:
EXTRACT series type
Anton wrote:
Try this out:
line1: "Julie1234"
id: [thru "" 3 4 digits ""]
rule: [a: some [id | [skip b:]] (print copy/part a b)]
parse line1 rule
Nice trick, I would never have thought of it. It will really be useful for
'extract rule checking (see my last post). I was surprised by the
Andrew Martin wrote:
I think that you might find:
parse load "your example string here" Rules
might be more versatile.
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
Thanks Peter and Andrew, you both know your 'parse. Unfortunately your answers didn't
help me with the first issue. Perhaps I need to explain the problem more clearly. I
have
a large collection of log files generated by a Counter-Strike games server. When a user
connects a line is generated that
NOTE: I think my last reply was blocked due to having one 'Re:' too many
in the sunbject line. If you already read this please ignore.
Message Begins
Thanks Peter and Andrew, you both know your 'parse. Unfortunately your
answers didn't
help me with the first
Hi REBOL Community,
The REBOL philosophy goes "Simple things should be simple". Well I have to say
that the 'parse function is an exception! I've had to use it extensively for
parsing log files but it has literally taken me months to do simple things -
compared to a few weeks for the rest of the
I'm writing a script that requires setting the prompt. Trouble is when I
set the prompt rebol prints the result to the console, which is
undesirable:
system/console/prompt: "new-prompt- "
== "new-prompt- "; - I don't want this line printed
new-prompt-
I tried redirecting console output