Help for this page

Select Code to Download


  1. or download this
    my $a = 'first second ...other non-\w char groups...'; my @s;
    
    ...
        push @s, $1;
      } elsif ... other stuff not important
    }
    
  2. or download this
    while (... not finished string ...) {
      if (my @m = ($a =~ /\G(\w+) ?/gc)) {
        push @s, @m;
      } elsif ... other stuff not important
    }
    
  3. or download this
    while (... not finished string ...) {
      if (my @m = ($a =~ /\G(?:(\w+) ?)+/c)) {
        push @s, @m;
      } elsif ... other stuff not important
    }