fork download
  1. #!/usr/bin/perl
  2. use warnings;
  3. use feature 'say';
  4.  
  5. $s = "a{b}{c}{d}";
  6. my @res = ($s) =~ /{([^{}]+)}/g;
  7. say "@res";
  8.  
Success #stdin #stdout 0s 6132KB
stdin
Standard input is empty
stdout
b c d