sweepy838 has asked for the wisdom of the Perl Monks concerning the following question:
output should be "aaaa bbbbb" with no space at the beginning, but i get the space, and i know it has something to do with the \S that means any non-space character.. but it doesnt work without it either. help? thanks again, i am trying :p$input = "xxxx aaaa bbbbb"; ($txt) = $input =~ /\S{5}(.+)(?{length($input);})/; chomp; print $txt;
Original content restored above by GrandFather
edit: jeez it's always after i post that i find the problem, replace the \S with a dot.. problem solved
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex problem (again)
by JavaFan (Canon) on Apr 30, 2012 at 06:22 UTC | |
by uday_sagar (Scribe) on Apr 30, 2012 at 06:45 UTC | |
by JavaFan (Canon) on Apr 30, 2012 at 15:11 UTC |