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: rotenca:telvia:it at: 14-Dec-2001 16:30

Hi Petr,
> But why not to use rule? Because of having everything on one line? OK, with > rebol - it is pretty legal to have whole script on one line (if you don't > use comments of course :-), so:
For joke not for war, this is mine one-istruction one-line solution: print (parse/all s: read %memo.txt [(digit: charset [#"0" - #"9"] div: charset [#"^/" #"^-" #"(" # ) #";" #"." #"," #"{" #"}"]) any [[opt div h: [3 digit "-" 3 digit "-" | 3 digit "-" ] 4 digit any digit h1: opt div (change h head insert/dup clear "" "#" (index? h1) - index? h)] | skip]] s) divisors in div can be changed as you like. --- Ciao Romano