Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Describing a set of characters

 [1/4] from: gavin::mckenzie::home::com at: 22-Sep-2000 20:55


Hi folks, Hope you can help... I'm doing some parsing and want to match against any character except a quote. Is there some charset magic where I can do this? Thanks in advance. Gavin.

 [2/4] from: jsc:dataheaven at: 23-Sep-2000 3:22


Am Sam, 23 Sep 2000 schrieben Sie:
> Hi folks, > > Hope you can help... > > I'm doing some parsing and want to match against any character except a > quote. > > Is there some charset magic where I can do this?
cset: complement charset [#"'"] Regards Jochen

 [3/4] from: joel:neely:fedex at: 22-Sep-2000 21:21


Or... nonquote: complement charset {"} if you meant everything except standard quotations marks. -jn- [gavin--mckenzie--home--com] wrote:

 [4/4] from: brett:codeconscious at: 23-Sep-2000 18:50


And for something to show how this can work:
>> nonquote: complement charset {"}
== make bitset! #{ FFFFFFFFFBFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF }
>> parse-rule: [any [ copy non-quote-data some nonquote (print
non-quote-data) | {"} (print "a quote!") ]] == [any [copy non-quote-data some nonquote (print non-quote-data) | {"} (print "a quote!")]]
>> parse/all {one" two "three} parse-rule
one a quote! two a quote! three == true Brett.