#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    2
    Rep Power
    0
    I am havign a bit of trouble getting my brain to work guys. I KNOW this hould be easy...

    I need to pattern match an md5 sum. To make sure it is 32 chars, contains only 0123456789abcdef as chars....


    HELP! my brian is fryed.
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    Southern California
    Posts
    73
    Rep Power
    14
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by SimonWaltr:
    I need to pattern match an md5 sum. To make sure it is 32 chars, contains only 0123456789abcdef as chars....[/quote]

    How about this:

    if ($str =~ /^[a-zA-Z0-9]{32}$/) {
    # success...


IMN logo majestic logo threadwatch logo seochat tools logo