fork download
  1. #!/usr/bin/perl
  2.  
  3. # ア:A|1*
  4. # イ:23456)(
  5. # ウ:|A
  6.  
  7. "123456"=~/([0-9]+A|1*)/;
  8. print "$1\n";
  9.  
  10. "123456"=~/(23456)([0-9]+A|1*)([0-9]*)/;
  11. print "$1\n";
  12.  
  13. print "123456"=~/123(|A45)4/ ?true:false,"\n";
  14.  
  15. print "123456"=~/123(|A45)6/ ?true:false,"\n";
  16.  
Success #stdin #stdout 0s 3612KB
stdin
Standard input is empty
stdout
1
23456
true
false