This string processing exercise is taken from the post:=20

http://discuss.joelonsoftware.com/default.asp?design.4.195596.22

Begin //////////////////////////

Given a text number of the follwing format:

AH-1-1
Or=20
AH-1-1G
Or
AH-1-G1

During data entry, we want the number code of the last part (token) to
increment by one.

So, if you pass the above values, you get

AH-1-1    -->  AH-1-2     --> AH-1-3
AH-1-1G  -->  AH-1-2G  --> AH-1-3G
AH-1-G1  -->  AH-1-G2  --> AH-1-G3

////////////// End

I posted a REBOL version, but I'm not terribly gifted at writing parse
rules. I'd be curious to see how other REBOLers might handle it.

Of course, if you have an approach that is elegant and/or terse, reply
to the orginal poster.

Regards,
Ed
-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to