Windows Perl Scripting Forums » General

PERL code question

(1 post)
  • Started 6 years ago by

No tags yet.


  1. Anonymous

    Hi,

    I have below code :

    [code]

    my($abc) = "fred<hello>3hello";
    $abc =~ /^[^\d]{2,4}<([^>]+)>\d?\1$/;

    if (defined($1)) {
    print "$1\n";
    } else {
    print "not found\n";

    }
    }
    [/code]
    What is the code doing ?? what function of the regular expression
    [code]
    $abc =~ /^[^\d]{2,4}<([^>]+)>\d?\1$/;
    [/code]
    Please advice what it do ??

    Posted 6 years ago #

RSS feed for this topic

Reply

You must log in to post.