From: Sean Russell Date: 2002-07-05T00:15:19+09:00 Subject: Re: the pains of parsing Park Heesob wrote: >> did you take a look at sean's version, by the way? >> a tad more elegent although he does use regexps. >> > Sean's version fails at > str = 'a[c]{d}"e"f {{g}} [[h]]*i**j*"k"l' Adding two characters to the regexp fixes that. The regexp should be string =~ /(.*?)(?=[<[{"*']|$)/ -- |.. "They that can give up essential liberty to obtain a little <|> temporary safety deserve neither liberty nor safety." /|\ -- Benjamin Franklin /| |