LPM: regex question --
David Hempy
hempy at ket.org
Tue Dec 14 11:39:27 CST 1999
At 11:06 AM 12/14/1999 -0600, you wrote:
>I need to replace something like:
>
>"one","two","three","four,five","six"
>
>with
>
>"one";"two";"three";"four,five";"six"
I'm new at this, so I'll jump in early. That way, the pros can correct me
or show me up after the fact. ;-)
This should work, if you know the input is going to be well behaved:
s/","/";"/g;
(I don't think you have to escape the quotes, but I haven't actually tested
it.)
If ever got "one",",","two" you'd be in trouble. (I think)
I'm eager to see a more robust solution.
-dave
--
David Hempy
Internet Database Administrator
Kentucky Educational Television
More information about the Lexington-pm
mailing list