in reply to Re^3: Using grep on windows
in thread Using grep on windows

yes it is at the start of the comment. But it doesn't work even if u put log message manually. Here is the comment in the log message "CNR12345 commit to hook check"

Replies are listed 'Best First'.
Re^5: Using grep on windows
by ikegami (Patriarch) on Oct 27, 2009 at 21:20 UTC
    You are mistaken.
    my $commitlog = "CNR12345 commit to hook check"; my ($cnr_number) = $commitlog =~ /^(CNR[0-9]+)/m or die("You must enter a valid CNR\n"); print("CNR number is $cnr_number\n");
    $ perl a.pl CNR number is CNR12345