#!/usr/bin/perl -w open(F, "cl.txt"); @strings = <F>; sub getIssue { foreach $line (@strings) { $lihttps://ko.perlmaven.com/matching-numbers-using-perl-regexne =~ s/^\s+//; $line =~ s/\s+$//; if ($line =~ /\[[I|i][S|s][S|s][U|u][E|e]\s*[#]*\]\s*([A-Za-z0-9_.\-]+)/) { $desc = $1; return $desc; } $desc; }; $issue = &getIssue(); close(F);
.* 가 모든 문자.
참고 : https://ko.perlmaven.com/matching-numbers-using-perl-regex