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

[REBOL] Parse

From: mccarter:uniserve at: 7-Mar-2001 14:44

I've been busting my head for a while now against parse. I've been able to get simple rules to work famously and am able to get a lot of good results,,, but . Could someone please tell me where I'm going wrong here. If I run the following script the first parse is happy the second is not.. I have not been able to figure out what the proper way to do this is and I have spent too long at this. Thanks Bill. Using REBOL v 2.3.0.3.1 REBOL [ Title: "Test" Author: "Gyrus" Date: 3/02/2001 Version: 0.1 File: %test.r ] str: { 28/11/00 27.13 28.00 26.81 27.81 +0.93 2668900 27/11/00 26.31 27.63 26.25 26.88 +0.75 4346600 24/11/00 26.56 27.13 25.88 26.13 unch 810500 22/11/00 26.25 26.44 25.88 26.13 -0.12 1757300 } digits: charset "0123456789" area-code: ["(" 3 digits ")"] phone-num: [3 digits "-" 4 digits] print parse str [ [area-code | none] phone-num] print parse str [ copy text to [area-code | none] phone-num] wait 10