in reply to Re: simple regex problem
in thread simple regex problem
I like this approach (its the only one listed that fits the "only two" spec) but what happens if there is only one space?
"this hasonlyonespace" => "this hasonlyonespace"
How about:
$line =~ s/\s+/ /g; $line =~ s/ /:/ for (1,2);
-Blake
|
---|
In Section
Seekers of Perl Wisdom