Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Re: simple regex problem

by blakem (Monsignor)
on Mar 07, 2003 at 00:27 UTC ( #241042=note: print w/replies, xml ) Need Help??

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);


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://241042]
[stevieb]: hmmm seems the C# library doesn't work right on win10. With berrybrew, only part of the perl portable zip is extracted. no errors nothing. Guess I have to look at switching out zip libraries. sigh

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (9)
As of 2017-03-28 16:23 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (335 votes). Check out past polls.