Hi,

I am now struggling with a 'parse a little bit and need an advice ....

let's say I have some matching rule generated by 'build-rule function:

user-entry: "som? t*t to p??se"

rule: build-rule user-entry

will produce something like:

[thru "s" "om" skip " " "t" thru "t" " " "to" " " "p" skip skip "se"]

My intention was to create simple search engine, but I was not satisfied
with find/any, as "*" will search till next character, but not in the
current word. I mean - I want all options as text, teasdddddaasdddfat,
etc. to be matched by t*t. Let's say I will write S*e and it should
match Schatztruhe, as I often don't know exact wording. With current
behavior of find/any, it will scan till next char, so for S*e it's "e",
but regardles of "e" being part of the entire word, or being placed
somewhere else later in the text.

my build-rule function works, but I have problem with how to start the
rule.

[thru "s" "om" skip " " "t" thru "t" " " "to" " " "p" skip skip "se" to
end]

if the first "s" in the parsed text is those one of "some text to
parse", it's OK, but if another "s" is found first, it fails ...

str: "Something to say, some text to parse, something else"

So, how should I write my rule? How to skip first two occurances of "s"?

Thanks very much,

-pekr-

Reply via email to