Janek Schleicher wrote:
> 
> John W. Krahn wrote at Sun, 14 Jul 2002 13:45:19 +0200:
> >
> > my @tokens = split /({\\[^\s}{]+|\\[^\s\\}]+|\\[\\}]|})/, $line;
> >                       ^^         ^^          ^^
> 
> Perhaps we can simplify even this regex:
> 
> my @tokens = split / ( \\ (?: [^\s{}]+  |
                        ^
                        {

You are missing the leading brace.  Look at the pattern a little more
carefully.

>                               [^\s\\}]+ |
>                               [\\}]       )
>                        | }
>                      )/x
>              => $line;

my @tokens = split /({\\[^\s}{]+|\\(?:[^\s\\}]+|[\\}])|})/, $line;



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to