it should return:my $a = qq(foo bar foo bar foo bar foo bar foo bar); $a =~ s/HELP HERE{4}.+/$1.../g; # <<< this is the problem print $b;
foo bar foo bar...
can this be done with one nice regex ? :-)
In reply to get first e.g. 5 words and replace the remaining string with ... with one regex by dreamy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |