[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Specific fixed width question...

From: Judd Storrs
Subject: Re: Specific fixed width question...
Date: Thu, 16 Sep 2010 09:32:18 -0400

On Thu, Sep 16, 2010 at 5:59 AM, Sergei Steshenko <address@hidden> wrote:
> $s =~ m/^.{3}(.{4}).{5}(.{6})/;
> #              $1        $2

This particular task doesn't really need pattern matching so why
bother with a search? Cutting strings up is exactly what scanf does.
Why is "^.{3}(.{4}).{5}(.{6})" superior to "%*3c%4d%*5c%6d"? What's
the benefit?


Some people, when confronted with a problem, think ``I know, I'll use
regular expressions.'' Now they have two problems. --jwz

reply via email to

[Prev in Thread] Current Thread [Next in Thread]