List Info

Thread: Delimited Text File




Delimited Text File
user name
2006-07-25 09:53:18
Sorry error in my last post.

"the aim is to get rid of the commas inside the double
quotes (between
"comma") and replace with a |"

should read

"the aim is to keep the commas inside the double
quotes (between
"comma") and replace any other ones with a
|."


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to
regex-unsubscribegooglegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---

Delimited Text File
user name
2006-07-25 13:49:12
what's wrong with Xicheng's pattern?:

,\s*("[^"]*"|[^",]*)

and replace with

|$1

as a result, the orig string

fred,"comma,comma,comma","quote",
another quote

becomes

fred|"comma,comma,comma"|"quote"|ano
ther quote

tested OK for .NET syntax in Expresso.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to
regex-unsubscribegooglegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )