in reply to Re: Matching numbers by regex.
in thread Matching numbers by regex.

In the above code (and in the other replies in the thread),

[^\d]*

may be represented with

\D*

and will be more efficient as well, since it avoids calls to utf8::IsDigit internally.

• another intruder with the mooring in the heart of the Perl

Replies are listed 'Best First'.
Re^3: Matching numbers by regex. (remember \D)
by GrandFather (Saint) on Apr 19, 2006 at 10:34 UTC

    Heh, good point! I do tend to forget the uppercase versions of the character set match flags such as \D \W \S. Thanks for the reminder.


    DWIM is Perl's answer to Gödel