Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^2: string manipulations.

by valavanp (Curate)
on Nov 23, 2006 at 09:52 UTC ( #585695=note: print w/ replies, xml ) Need Help??

in reply to Re: string manipulations.
in thread string manipulations.

First thanks all for your solutions. But the problem is in the array B, i have colors such as Neon Pink, Neon Yellow, Neon Green, Neon Purple etc. when using split it splits into Neon one element and Pink one element and so on. But Neon Pink is a single color. Because each element i am storing in an array and inserting into database. so the single element splits into two. Also i have colors like Translucent Navy, Purple Ice, Blue Ice etc. any ideas. thanks all for your suggestions.

Comment on Re^2: string manipulations.
Replies are listed 'Best First'.
Re^3: string manipulations.
by davido (Archbishop) on Nov 23, 2006 at 16:21 UTC

    You didn't test my solution. If you reject my solution, at least test it first. What I provided splits on ',' (comma), and thus it's impossible for it to foul up in the way you're saying it does. I just tested it myself and found its behavior to be as you need, not as you're describing; it splits on comma, not on space.

    If you need reassurance, add the following line to the top of the script: $" = "/ ";

    If you do that, you'll see in the output clearly that the colors are being split correctly in the solution I provided.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://585695]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2015-12-01 04:10 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (792 votes), past polls