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

[REBOL] Re: Perl is to stupid to understand this 1 liner.

From: petr:krenzelok:trz:cz at: 15-Dec-2001 18:01

Carl Read wrote:
>>hide-it: func [s e][ l: length? copy/part s e remove/part s e >>insert/dup s "#" l) >>parse/all text [some [start: tel-num end: (hide-it) | skip]] >> > >>; <----- clear and readable, isn't it? :-) >> > >The height of clarity - but it doesn't work. (: The hide-it func ends >in a ")" not a "]" and where it's used in the parse line the 's and >'e parameters aren't given. I take it you didn't test it? (: > >But never mind. When fixed it works, unlike what I was doing till I >read your post... >
Ah, sorry - it was a last minute hack, to have paren in parse rule short and readable :-) Now as I think of it, it would be easier to have some buff: {} to copy result to, and build string from scratch ... But anyway .... I would still prefer building clear and readable rules, even on several lines and put them into separate .r file, instead of having messy code as shown with perl. -pekr-