fork download
  1. #!/usr/bin/perl
  2.  
  3. $var="foo foofoo";
  4.  
  5. @matches = ( $var =~ /(?<!foo)foo/g );
  6.  
  7. print "@matches";
  8.  
Success #stdin #stdout 0s 6044KB
stdin
Standard input is empty
stdout
foo foo