> I'm wondering if there's a more efficient way to do it (shortcuts in
REBOL)
>
> Basically I'm trying to do this...
>
> Mobile Email Address: [EMAIL PROTECTED]
>
> <Parsing algorithm>
>
> Result:
> ~~~~~~~~~~~~~~~~~~~~~~~
> Area Code: 416
> Phone Number: 5551234

Digit and Alpha are defined by one of my scripts:
>> Digit
== make bitset! #{
000000000000FF03000000000000000000000000000000000000000000000000
}
>> Alpha
== make bitset! #{
0000000000000000FEFFFF07FEFFFF0700000000000000000000000000000000
}

>> M: [EMAIL PROTECTED]
== [EMAIL PROTECTED]
>> parse M [
[    copy Area_Code 3 digit copy Telephone 7 digit #"@" [
[        some alpha some [#"." some alpha]
[        ]
[    end
[    ]
== true
>> Area_Code
== "416"
>> Telephone
== "5551234"

I hope that helps!

Andrew Martin
ICQ: 26227169 http://valley.150m.com/
-><-


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to