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"
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");