Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
$text = "test of this # ? my 0923 5834t674"; .... .. .......... . . .. .... ........
if ($text =~ $nbsp) { $text =~ s/(.*)$nbsp(.*)//g; # ( ) PUTS TEXT INTO $1, $2, etc. $tex1 = $1; # WHAT COMES BEFORE THE PRE TAG $tex2 = $2; # WHAT COMES AFTER $tex1 =~ s/[^ ]/$repl/g; # BLANK OUT, EXCLUDING SPACES $tex2 =~ s/[^ ]/$repl/g; $text = "$tex1$nbsp$tex2"; } else { $text =~ s/[^ ]/$repl/g; } print "$text\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Blanks with pre tag exceptions
by graff (Chancellor) on Mar 05, 2004 at 05:32 UTC | |
|
Re: Blanks with pre tag exceptions
by bart (Canon) on Mar 05, 2004 at 08:52 UTC |