Hi List
I have being struggling all day with a parse problem: extracting all strings from a
Rebol script.
It may seem trivial at the first look.
However as you know strings are delimited by a pair of () or by ({) and (}) and
inclusions are allowed.
{Hello vous} and Salut {you} are valid
Hi List,
I'd like to parse a string searching for two things at the same time.
it seems to me that this is impossible.
For example, a text from which I want to extract the HREF and the SRC target.
myText: {A HREF=#section1IMG SRC=foobar.gifA HREF=#section1}
parse myText [
any [ thru
Rebol has these:
time?-- for testing a value to see if it's a time! value.
time!-- to indicate a value of time! type.
time -- a generic value that contains a time! value.
What would be a suitable name for a parse rule that picks out a time value
from text? How
Hi all,
Romano wrote a small macro interpreter. I simplified it a bit, used two
variants (the second variant uses explicit RECYCLE command) and here are my
results:
delimit: [*(]
notpar: complement charset )
compose-string: function [
[catch]
String [string!]
/trace
][
macro
Hello, run the first parse below for a nice crash. :P
Crashes on these windows versions:
- a clean REBOL/View 1.2.8.3.1 3-Aug-2002 (beta)
- a clean REBOL/View 1.2.1.3.1 21-Jun-2001
- Rebol/Link 1.0.2.3.1 25-Mar-2002/14:58:06-8:00
(clean meaning no user defined functions in user.r etc.)
Well, here is a simple example, tested
on a clean REBOL/View 1.2.8.3.1 3-Aug-2002 (beta)
and a clean REBOL/View 1.2.1.3.1 21-Jun-2001
I could probably do some more experiments
and figure out some more details, but
anyway:
---
crash: func [demonstrates a bug in parse that crashes rebol
parse/all data [
some [
h: any copy num integer!
I must have missed this or knew it and lost it from memory, but I didn't
realise you could parse string data by specifying a datatype (I knew it for
blocks of course - they are already loaded).
So:
parse {3} [integer!]
== true
Joanna wrote:
Has anyone made REBOL script that could parse Slashdot news headers and
view them on small window? All info (including links to files) are on
http://slashdot.org/code.shtml
There is no example on REBOL. IMHO it woud make an nice example how
REBOL/VIEW can be used. I looked
I have a working html-to-text converter, but would like to add the links to the text
as well.
The following parse rule works well to extract only the links...
link: [some [thru a href= copy lnk to (append text lnk)]]
... but is there any way to add this to the converter below?
I'm
Can anybody give me any hints why this small script causes stack overflow ?
thanks
Jose
REBOL []
txt-parser: make object! [
text: make string! 3
html-code: [
[ thru ] |
copy txt to (append text txt)
]
parse: func [source [string!]] [
clear
Hiyas all:-)))
I have just downloaded REBOL/view and have startet playing with nntp.r and have
stumpled into some problems.
I have no problems connection to the news-server and getting the subject-lines from
the news-group i'm interrested in. But here comes the problem. I receive them in one
Hello folks,
I have a script that loads a given HTML page, parses it, and triggers different
actions for the different tags it comes across. For the parsing, I have a parse rule
that I invoke like this (those of you who don't bother reading all the code, skip to
the bottom to see some
Hallo all,
I am (still) experimenting how to colourise email
texts using Cyphre's color-text.r style.
The script already colourise in a slrn-like style
the messages I receive but something is still missing.
What I need now is to make bold the strings
delimited with #*, underline the ones
Hi, I have found out that 'parse restarts the rule evaluation at the top as soon
as one rule could be satisfied. Wouldn't it be faster to continue to evaluate
the rest of the rules? Further it would be possible to solve some parsing
problems easier if rule ordering could be used. Robert
--
To
The following syntax is incorrect. Is there any way to accomplish my
intentions?
parse/all sample [copy text to [- | end] (print text)]
Ryan C. Christiansen
Web Developer
Intellisol International
4733 Amber Valley Parkway
Fargo, ND 58104
701-235-3390 ext. 6671
FAX: 701-235-9940
Can anyone point me to usage documentation for 'parse-header? Using 'help,
I get the following, but I'm still not sure what 'parse-header is used for?
(I'm trying to digest mime-model.r and it uses 'parse-header)
help parse-header
USAGE:
PARSE-HEADER parent data
DESCRIPTION:
Returns
We are parsing large files as blocks. If there is an
error somewhere, how can we find out where the error
was? Can we get a count of items parsed correctly?
Thanks
dv
=
please reply to: [EMAIL PROTECTED]
__
Do You Yahoo!?
Get email at your
Hello,
Is the following behavior expected?
parse "html" ["html" | "htm"]
== true
and
parse "html" ["htm" | "html"]
== false
(the above is what bothers me)
while:
parse "htm" ["html" | "htm"]
== true
and
parse "htm" ["htm" | "html"]
== true
thanks in advance, fantam
--
Heya,
While I'm at it;
I've noticed this issue repeatedly in my data mining scripts. The
parse command sometimes just will not work with the following format;
webpage: read http://www.yaddayadda.com
datamine: make string! ""
parse webpage [thru "something" copy datamine to "somethingelse"]
In
is there a function that reverses parse-xml; builds
xml from the block?
regards
david
example:
s: "aHello/a"
parse-xml s = [document none [["a" none ["Hello"
__
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
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
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
Hey list,
none of my mail has been leaving my computer lately, so sorry if this
turns out to be a repeat queston. Does anyone have a list of parse
examples? I have the ones from all the current documentation, but was
thinking more along the lines of "a parse for any occasion". This
time, I'd
--
Spend less time composing sigs.
-tom
hey guys,
sorry about that blank post.
If given a block, ["text, text -b text --b , text"],
how do I replace -b and --b with b and /b, respectively?
--
Turn your computer off. Go outside.
-tom
tom wrote:
If given a block, ["text, text -b text --b , text"],
how do I replace -b and --b with b and /b, respectively?
This is the most direct way:
block: ["text, text -b text --b , text"]
== ["text, text -b text --b , text"]
string: copy first block
== "text, text -b text --b , text"
-
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 20, 2000 10:00 PM
Subject: [REBOL] parse or Re:(4)
Ahh, but this is not enough, because if the report has more than one
newline
character following a paragraph, you will end up with empty paragraphs.
But what if
[EMAIL PROTECTED] wrote:
Sure. In the interests of advancing its popularity, I
offered up a simplistic example of PARSE. :-)
Paragraphs can end in a variety of punctuation ("!?.-;:),
with different quantities (as Russ pointed out), no?
-jeff
Sure! Nothing wrong with simple
Hi, Ryan...
[EMAIL PROTECTED] wrote:
[snip]
You missed another option, which I had been using previously. Here
is the function:
[snip]
In other words, replace all instances of a set of characters with
a new character that can be recognized later...
You're absolutely right! Thanks
r of every conceivable
paragraph!
Russell [EMAIL PROTECTED]
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 20, 2000 10:00 PM
Subject: [REBOL] parse or Re:(4)
Ahh, but this is not enough, because if the report has more than on
Point well-taken. It seems I have forgotten the KISS law.
-Ryan
"Keep It Simple, Stupid."
So what? Seems the application that's going to use the block of paragraphs
could easily deal with the "" for an empty paragraph. To me, that's
preferable than trying to outguess the final character of
Hey Joel,
Re-remembering the subtle differences
between BNF and REs was (for me, at least) the hardest part of
getting productive with parse .
It would be really handy if you (or others) could list some of the
differences you refer to. I've never actually used REs but have read up on
them
Ahh, yes, of course, the reason for my dilemma in the first place.
"Paragraphs" are much different animals than "lines."
I don't think that just breaking on {^/} solves the problem as posted.
The objective, as I read it, was to break on PARAGRAPHS (not lines)
where a paragraph is defined as the
"plain English.") The function follows...
REBOL []
parse-paragraphs: func [
"Parse a document into a block of paragraphs."
document [string!] "the document to be parsed"
][
paragraph-block: copy []
current-paragraph: copy ""
stopper: cha
t position to define what he means by "paragraph". As I recall the
original problem, paragraphs *were* defined "according to Joel".
.Russell [EMAIL PROTECTED]
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 21, 2000 5:08 AM
S
[EMAIL PROTECTED] wrote:
Joel-
... I also changed some of the 'words because I like my scripts
to read like "plain English.") The function follows...
Thanks! It's nice to watch these things evolve. (As far as the
coding style, I freely confess to getting fairly terse at times;
I just
Ooooh! Typo on my part. Apologies for any confusion it caused. Where
I typed
The objective, as I read it, was to break on PARAGRAPHS (not lines)
where a paragraph is defined as the end of a sentence that concides
with the end of a line...
I intended to be saying (correction in all
paragraphs: {First paragraph.^/Second "paragraph."^/Third
paragraph.}
== {First paragraph.
Second "paragraph."
Third paragraph.}
probe parse paragraphs [{.^/} | {."^/}]
false
== false
probe parse paragraphs ({.^/} or {."^/})
** Script Error: Cannot use or~ on string! value.
** Where: ".^/" or
"h" is present.
parse/all st "gb"
== ["a" "cdef"] ; Split at the single char that matched.
Russell [EMAIL PROTECTED]
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 20, 2000 12:26 PM
Subject: [REBOL] parse
paragraphs: {First paragraph.^/Second "paragraph."^/Third paragraph.}
parse paragraphs [some [thru {.^/} | thru {."^/} | thru "." end]]
This returns "true"
But what if I'm trying to parse a report and wish to make each
paragraph a separate string within a block?
paragraphs: {First
Howdy, Ryan:
paragraphs: {First paragraph.^/Second "paragraph."^/Third paragraph.}
parse paragraphs [some [thru {.^/} | thru {."^/} | thru "." end]]
This returns "true"
Yep, that means that PARSE successfully made it through the
whole string.
To break up your paragraphs,
-
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 20, 2000 1:54 PM
Subject: [REBOL] parse or Re:(2)
Hi Ryan: Here's a one liner that may help:
st: "abcdef"
== "abcdef"
parse/all st "ed"
== ["abc" "" &
Will Jeff's approach work if the paragraphs contain multiple periods?
Russell [EMAIL PROTECTED]
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 20, 2000 1:41 PM
Subject: [REBOL] parse or Re:(3)
Howdy, Ryan:
paragraphs: {First
Hi, Jeff... you beat me to the "Send" button! ;-)
Since I'm now obligated to add value, instead of just saying
"me too", see additional remarks below.
[EMAIL PROTECTED] wrote:
Howdy, Ryan:
paragraphs: {First paragraph.^/Second "paragraph."^/Third paragraph.}
parse paragraphs
I assumed that
this is NOT what you wanted, but rather you wanted to copy through
either {.^/} or {."^} WHICHEVER COMES NEXT. (Natural language
text munching is a real pain, speaking from personal experience! ;-)
Yes, this is what I was looking for. As someone who has never
parsed anything
Howdy, Joel:
Notice that now the result block has only TWO elements!
Since the first test (the thru {.^/} part) can succeed by
grabbing text all the way to the end of the SECOND
paragraph, it does so, putting the first two paragraphs
into the first output string. I assumed that this is
See my stuff interjected below:
Russell [EMAIL PROTECTED]
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 20, 2000 1:54 PM
Subject: [REBOL] parse or Re:(2)
paragraphs: {First paragraph.^/Second "paragraph."^/Third paragraph
Ahh, but this is not enough, because if the report has more than one newline
character following a paragraph, you will end up with empty paragraphs.
But what if I'm trying to parse a report and wish to make each
paragraph a separate string within a block?
Simple parsing with the /all
At 08:51 AM 9/14/00 -0800, you wrote:
Hi:
I've noted some discussion regarding a parse tutorial in
the lists:
Do any parse tutorials now exist?
thanks
-tim
REBOL The Official Guide: pp 300
;- Elan [ : - ) ]
author of REBOL: THE OFFICIAL GUIDE
REBOL Press: The Official Source for
In order to improve my skills with the REBOL parse word, I thought I would go
through "Mastering Regular Expressions" by Jeffrey Freidl and do all the
examples in REBOL. Here is my first attempt and it does not work.
The script is supposed to take a list of files and indicate whethe
terrence-brannon wrote:
rules: [
to "resetsize" (size-cmds: size-cmds - 1)
|
to "setsize" (size-cmds: size-cmds + 1)
]
Try 'thru instead of 'to.
Note that "setsize" is equal to last seven letters of "resetsize".
Me: [
"Andrew Martin"
ICQ: 26227169
using thru did not result in correct parsing
= Original Message From [EMAIL PROTECTED] =
terrence-brannon wrote:
rules: [
to "resetsize" (size-cmds: size-cmds - 1)
|
to "setsize" (size-cmds: size-cmds + 1)
]
Try 'thru instead of 'to.
Note that "setsize" is equal to last seven
Hi:
I've noted some discussion regarding a parse tutorial in
the lists:
Do any parse tutorials now exist?
thanks
-tim
Howdy, Terrence:
Neat stuff. Planning on making web page out of the result?
In order to improve my skills with the REBOL parse word, I thought I would go
through "Mastering Regular Expressions" by Jeffrey Freidl and do all the
examples in REBOL. Here is my fir
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, September 15, 2000 2:51 AM
Subject: [REBOL] Parse Tutorial?
Hi:
I've noted some discussion regarding a parse tutorial in
the lists:
Do any parse tutorials now exist?
thanks
-tim
Hi Tim,
I
Got it!
Thanks Allen :)
[EMAIL PROTECTED] wrote:
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, September 15, 2000 2:51 AM
Subject: [REBOL] Parse Tutorial?
Hi:
I've noted some discussion regarding a parse tutorial in
the lists:
Do
Cheers, I'll give it a go.
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 31, 2000 6:12 PM
Subject: [REBOL] Parse, spaces and ()s Re:
Actually, the ()'s are not causing the results you're getting. For rule-based
parsing, spaces are ignored
Newby question...
Can anyone tell me what is going on here? The following output is produced by
the script below
one
(
two three
)
four
(
five
(
six seven
)
eight
)
Why do "two" and "three" appear as one string (same with "six" and "seven")
and not split up at the space between them like
Actually, the ()'s are not causing the results you're getting. For rule-based
parsing, spaces are ignored unless you use the /ALL refinement.
To get the results you want try:
parse/all str [some rule-block]
[EMAIL PROTECTED] wrote:
Newby question...
Can anyone tell me what is going on
Hi List,
I have a file containing the following kind of lines:
9;"1081230012";999;1000103;0;84.00;0;999;0.84;1;"6";0;991030;0;73.92
;0.84;9;"L";991030;0;108;123;0;" "
With this line i like to get rid of the leading "1" ( should be yymmdd =
00/01/03 )in the 4th field. For this i like to
[EMAIL PROTECTED] wrote:
Hi List,
I have a file containing the following kind of lines:
9;"1081230012";999;1000103;0;84.00;0;999;0.84;1;"6";0;991030;0;73.92
;0.84;9;"L";991030;0;108;123;0;" "
With this line i like to get rid of the leading "1" ( should be yymmdd =
00/01/03 )in
[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
Hi List,
I have a file containing the following kind of lines:
9;"1081230012";999;1000103;0;84.00;0;999;0.84;1;"6";0;991030;0;73.92
;0.84;9;"L";991030;0;108;123;0;" "
With this line i like to get rid of the leading "1"
Volker wrote:
how about (if no ";" inside data!) ?
a:
{9;"1081230012";999;1000103;0;84.00;0;999;0.84;1;"6";0;991030;0;73.92;0.84;9;"L";991030;0;
108;123;0;" "}
b: parse a ";"
{
== ["9" "1081230012" "999" "1000103" "0" "84.00" "0" "999" "0.84"
"1" "6" "0" "991030" "0" "73.92"
understand
what magic
you put there, and I learnt something as a result.
I've made a few tests so far and cannot fault it.
Thanks,
Brett.
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 31, 2000 4:06
le to understand
what magic
you put there, and I learnt something as a result.
I've made a few tests so far and cannot fault it.
Thanks,
Brett.
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 31, 2000 4:06 AM
Subject: [REBOL] Parse does not ha
[EMAIL PROTECTED] wrote:
I attempted to write a function that would take the structure that parse-xml
generates and export it back into a valid xml file.
But, I found that it cannot be reliably done.
Beg pardon, but it can be done.
Here's an example.
parse-xml {ateststringb/c//a}
==
dislav. It took a little while to
understand
what magic
you put there, and I learnt something as a result.
I've made a few tests so far and cannot fault it.
Thanks,
Brett.
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 31, 20
Hi, I think, that Parse has got a bug as in:
parse "a" [none skip]
== true
cc-ing to feedback. Here is a version of A-B-rule, that should
work reliably. Test it please.
A-B-rule: func [
"Generate an A-B parse rule"
A [block!] {A-rule}
B [block!] {B-rule}
/local o
] [
o:
Hi,
try this: (but look out!) As long, as Rebol functions are CQSB
with DRP, there are problems with Rule-res word local to A-B-rule
function.
A-B-rule: func [
"Generate an A-B parse rule"
A [block!] {A-rule}
B [block!] {B-rule}
/local succeed fail rule-res
] [
[[B to end
With a few adjustments, it should be able to handle all xml-parsed
trees, afaik... but it's 5:48am right now, so I may be wrong. :-)
I think I stand corrected. Which is good :)
You can also parse the whole parse-xml structure with the new block
parser in /View and /Core 2.3. It only takes
4:06 AM
Subject: [REBOL] Parse does not have "not" match type. Re:
Hi, I think, that Parse has got a bug as in:
parse "a" [none skip]
== true
cc-ing to feedback. Here is a version of A-B-rule, that should
work reliably. Test it please.
A-B-rule: func [
"G
I was playing around with the idea of using rebol to convert EBNF to Rebol
parse rules. A strange occupation maybe, but I thought it might be useful
one day. Anyway, I found a rule in EBNF, as described in XML1.0 -
http://www.w3.org/TR/REC-xml.html, for which I believe there is no
equivalent
I have a script which works under Core 2.2 but fails under 2.3:
The problem appears to be in the way I use parse, but I cant see what is
wrong, particularly since it worked under 2.2
Thanks,
Garold (Gary) L. Johnson
DYNAMIC Alternatives http://www.dynalt.com/
[EMAIL PROTECTED] mailto:[EMAIL
I have a script which works under Core 2.2 but fails under 2.3:
The problem appears to be in the way I use parse, but I
cant see what is wrong, particularly since it worked
under 2.2
Thanks,
Garold(Gary) L. Johnson DYNAMIC Alternatives
Try:
print mold
Jeff wrote:
Try:
print mold system/options/args
2.3 contains a goof with how the command line args are
passed. What once was a string is now a block containing
a string.
[snip]
The next version will correct the arg passing behavior
back to the old style.
Your
greater? to binary! "a" to binary "AB"
true
greater? "a" "AB"
false
works allways?
Volker
Hello [EMAIL PROTECTED]!
On 17-Apr-00, you wrote:
s use
s parse/case
Actually, we were talking about the comparison operators, such as
, , = etc.
Regards,
Gabriele.
--
Hi
use
parse/case
(BTW, if the comparison between chars is case insensitive, it
should be enough to convert them to integers first.)
AR
--
Sent through GMX FreeMail - http://www.gmx.net
-
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, 17 April 2000 7:23 PM
Subject: [REBOL] Parse Re:(5)
Hi
use
parse/case
(BTW, if the comparison between chars is case insensitive, it
should be enough to convert them to integers first.)
AR
--
Sent through GMX FreeMail
Gabriele wrote:
A C == #"Y"
A C == #"Z"
A ] [
Hmmm... this seems a bit crazy to me... ;-) What about:
if all [C #"A" C #"Z"] [ ... ]
Actually, I tried a approach very similar to that, but I seemed to get a
result that indicated that the comparison was case _insensitive_.
- Puvodní zpráva -
Od: [EMAIL PROTECTED]
Komu: [EMAIL PROTECTED]
Odesláno: 13. dubna 2000 18:11
Predmet: [REBOL] Parse
How would I parse such that
ThisIsTheLine
would result in:
This Is The Line.
Larry
Hi, here is my version:
char: [skip]
capit: charset
Hi all!
Larry asked:
How would I parse such that
ThisIsTheLine
would result in:
This Is The Line.
Using parse, try this ...
the-line: "ThisIsTheLine"
big-alpha: charset [#"A" - #"Z"]
tmp: none
parse/all/case the-line [
skip ; Skip the first character
any [to
Hi, Daniel,
you wrote:
It seems strange to me that
digit: charset "0123456789"
parse "123" [to digit]
and
block: ["1" | "2"]
parse "123" [to block]
fail (on my Mac). Any ideas how to write it better?
This works for blocks:
block: [to "1" | to "2"]
parse "123"
How would I parse such that
ThisIsTheLine
would result in:
This Is The Line.
Larry
Larry asked:
How would I parse such that
ThisIsTheLine
would result in:
This Is The Line.
I know, it doesn't use 'parse, but this way was more obvious...
[
REBOL [
]
Line: "ThisIsTheLine"
Split: function [Line [string!]] [Result] [
Result: make string! 0
foreach C Line [
if
It seems strange to me that
digit: charset "0123456789"
parse "123" [to digit]
and
block: ["1" | "2"]
parse "123" [to block]
fail (on my Mac). Any ideas how to write it better?
This works for blocks:
block: [to "1" | to "2"]
parse "123" [block]
but is not so elegant for large blocks.
Daniel
parse "LIB1 " ["LIB1"]
== false
parse "LIB1 " ["LIB1" to end]
== true
parse "LI B1 " ["LIB1" to end]
== false
result says, could parse full string, or there is a rest, IMO.
Volker
Am Mit, 05 Apr 2000 schrieben Sie:
Hi Volker
you wrote:
At 12:41 PM 4/6/00 +0200, you wrote:
parse "LIB1 " ["LIB1"]
== false
parse "LIB1 " ["LIB1" to end]
== true
parse "LI B1 " ["LIB1" to end]
== false
result says, could parse full string, or there is a rest, IMO.
that is correct
parse is very powerfull but still kills me with spacer:
parse "asergd" lib-name
== true
parse "LIB1" lib-type
== true
so the 2 elements matches the 2 single rules.
but pout together they don't :
parse "asergd LIB1" [lib-name lib-type]
== false
probe parse "asergd LIB1" [lib-name
:[EMAIL PROTECTED]]
Sent: Wednesday, April 05, 2000 10:42 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] parse / space
parse is very powerfull but still kills me with spacer:
parse "asergd" lib-name
== true
parse "LIB1" lib-type
== true
so the 2 elements matches the 2 singl
Hi bciceron,
The short version is: I believe it's a bug.
The long version:
space at the begining of string:
parse " LIB1" ["LIB1"]
== true
space smack in the middle of token:
parse "LI B1" ["LIB1"]
== false
Now, that somehow makes sense. If I am parsing for the token LIB1 I do not
want
Thanks Gabriele,
I was wondering where the to-integer was, but then i realised that the
(value: load value) took care of it.
Interesting that you looked at the data in terms of repeating groups and so
processed them using some..., when i came up with a parse rule, i tried to
use recursion and i
Hello All,
I have a file consisting of lines in the following format:
"23123+34234+234234-23423+3-"
ie, n digits followed by a sign etc etc.
The only way i've been able to extract the data into a series is to do two
replaces, replacing "+" by "+ " and "-" by "- " and then parsing it using
the
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, February 19, 2000 11:15 AM
Subject: [REBOL] Parse questions ??
Hello All,
I have a file consisting of lines in the following format:
"23123+34234+234234-23423+3-"
ie, n digits followed
OK - how can I parse a line up until it strikes a number
iebill123
and return bill
??
Francois
Herbal, hey, I must have missed that while I was
at the mineral bath... Those poison oak leaves
are a real treat on your skin.
How did you ever find this article?
-Carl
At 2/1/00 04:47 PM +0100, you wrote:
http://www.nytimes.com/aponline/f/AP-So-Much-Money.html
Reply-to: jeff [EMAIL PROTECTED]
FCC: /home/jeff/outgoing
References: [EMAIL PROTECTED]
[EMAIL PROTECTED]
Oh, and the money wagon passed by while I was relaxing in
the mineral tub. Darn.
-Carl
Gee, we should invite that reporter down here around the
next time we get ready to
]]
Sent: Tuesday, February 01, 2000 9:11 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject:[REBOL] Parse this: Sassenrath gets herbal facial!
How did you ever find this article?
-Carl
At 2/1/00 04:47 PM +0100, you wrote:
http://www.nytimes.com/aponline/f/AP-So-Much
Here's an idea for extending the parse dialect:
words: make block! 10
== []
string-rule: ["str" skip "ng" [alpha | none]]
== ["str" skip "ng" [alpha | none]]
parse/all "An example string, a strong man, a strange day." extended [
[any [
[to-block string-rule copy word string-rule
[
Ingo,
I noticed several people had posted parse versions, so I'm sure you'll see
them by the time you see this mail. If not, let me know and I'll write one.
I'm pretty sure Elan wrote one at least.
Later!
On 24-Nov-1999/13:51:44+1:00, [EMAIL PROTECTED] wrote:
Hi Bo,
I am a bit behind with
1 - 100 of 121 matches
Mail list logo