|
Hi Richard and Gary,
Thanks a lot for your kind message. It helps me a lot! What I
want to do is to parse
a SAS format statement separated by a SAS format. For example,
For example:
"a b c 2.8 e f g $fmt. u v w $abc12.1 a b c A1224.123
$char8.2"
will be parsed into
a b c due to 2.8
e f g due to $fmt.
u v w due to $abc12.1
a b c A1234.123 due to $char8.2
I came up with a RE as follow
'/\$?[_a-zA-Z]\w{0,31}\.\d{0,2}/'
as the separator of a Format-like string, but it does not always work
at all kinds of situations.
Your advice will be very much appreciated. Thanks
LZ
|