$str =~ /^\d+$/; This pattern matches the start of the string (^) followed by a sequence of one or more digits (\d+), followed by the end of the string ($). ----- Original Message ----- From: "Pedro A Reche Gallardo" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 23, 2002 5:52 PM Subject: digits in string
> Hi all, how can check if one string only contains digits? > Cheers > *************************************************************************** > PEDRO A. RECHE , pHD TL: 617 632 > 3824 > Dana-Farber Cancer Institute, FX: 617 632 4569 > Harvard Medical School, EM: [EMAIL PROTECTED] > 44 Binney Street, D1510A, EM: [EMAIL PROTECTED] > Boston, MA 02115 URL: > http://www.reche.org > *************************************************************************** > > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]