# should be if(/^[0-9A-F]+\z/i){ print("$_ is a hexadecimal number!\n"); }else{ print("$_ is not a hexadecimal number!\n"); ## even blanks }
-----Original Message----- From: RTO RTO [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 11, 2002 11:20 AM To: Nikola Janceski; [EMAIL PROTECTED] Subject: RE: Simple RegEx Question use strict; while(<DATA>){ chomp; if(/[^0-9a-fA-F]+/){ print("$_ is not a hexadecimal number!\n"); }else{ print("$_ is a hexadecimal number!\n"); } } __DATA__ f4dxf ffaa99 gxad 2832 2842da --- Nikola Janceski <[EMAIL PROTECTED]> wrote: > give us a snippet of your code. you made a mistake > somewhere. > and give us examples of what the variables contain. > __________________________________________________ Yahoo! - We Remember 9-11: A tribute to the more than 3,000 lives lost http://dir.remember.yahoo.com/tribute ---------------------------------------------------------------------------- -------------------- The views and opinions expressed in this email message are the sender's own, and do not necessarily represent the views and opinions of Summit Systems Inc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]