Update: (?![ ]) vice (?=\S) in third example.>perl -wMstrict -le "my $string = 'W h a t H o ? N o G o .'; (my $sqz1 = $string) =~ s{ [ ] \b }{}xmsg; print qq{'$sqz1'}; (my $sqz2 = $string) =~ s{ \b [ ] }{}xmsg; print qq{'$sqz2'}; (my $sqz3 = $string) =~ s{ [ ] (?![ ]) }{}xmsg; print qq{'$sqz3'}; " 'What Ho ? No Go .' 'What Ho? No Go.' 'What Ho? No Go.'
In reply to Re^2: help me ---regarding string
by AnomalousMonk
in thread help me ---regarding string
by perlprint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |