Scott Pham wrote:
> I currently have this issue I can't seem to get to work correctly or
> more like at all.
> 
> I'm looking at a string say:
> 
> (one,two,three) word,word2,word3,word4
> 
> When I split this string using the comma, it splits the ones in parens as 
> well.
> 
> (one,two,three) word - this line should only be one string. So I was
> thinking, I could just replace the commas with in the parens to
> something say like -, so split doesn't pick it up. But I can't seem to
> get this regex right to do this. I either end up replacing everything
> or nothing at all.
> 
> Has anyone done this before?

Yes, many people for many years.  :-)

> Any pointers would be greatly appreciated.

perldoc -q "How can I split a \[character\] delimited string except when
inside \[character\]"



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to