Extract the required substring from another string -Perl

后端 未结 4 806
轮回少年
轮回少年 2020-12-19 16:45

I want to extract a substring from a line in Perl. Let me explain giving an example:

fhjgfghjk3456mm   735373653736
icasd 666666666666
111111111111
<         


        
4条回答
  •  忘掉有多难
    2020-12-19 17:37

    #!/usr/bin/env perl
    
    undef $/;
    $text = ;
    @res = $text =~ /\b\d{12}\b/g;
    print "@res\n";
    
    __DATA__
    fhjgfghjk3456mm   735373653736
    icasd 666666666666
    111111111111
    

提交回复
热议问题