Click here to Skip to main content
15,892,537 members
Home / Discussions / C#
   

C#

 
Generalsystem email manager Pin
Dan the Man29-Jan-03 11:04
Dan the Man29-Jan-03 11:04 
GeneralC# and the Microsoft Web Browser Control Pin
Jon Newman29-Jan-03 10:17
Jon Newman29-Jan-03 10:17 
GeneralRe: C# and the Microsoft Web Browser Control Pin
TigerNinja_29-Jan-03 12:21
TigerNinja_29-Jan-03 12:21 
GeneralRe: C# and the Microsoft Web Browser Control Pin
John Mautari30-Jan-03 5:38
John Mautari30-Jan-03 5:38 
GeneralDataGrid Columns Display Pin
hkl29-Jan-03 9:10
hkl29-Jan-03 9:10 
GeneralRe: DataGrid Columns Display Pin
TigerNinja_29-Jan-03 12:31
TigerNinja_29-Jan-03 12:31 
QuestionHow to launch an executable Pin
matthias s.29-Jan-03 9:08
matthias s.29-Jan-03 9:08 
AnswerRe: How to launch an executable - Solution Pin
matthias s.29-Jan-03 9:42
matthias s.29-Jan-03 9:42 
AnswerRe: How to launch an executable Pin
Mark Sanders30-Jan-03 3:12
Mark Sanders30-Jan-03 3:12 
Generalprblem with page.navigate Pin
bindu_harve29-Jan-03 8:49
bindu_harve29-Jan-03 8:49 
GeneralSecurity Issue HELP !!! ... Pin
Dato29-Jan-03 7:49
Dato29-Jan-03 7:49 
GeneralRe: Security Issue HELP !!! ... Pin
Paul Riley29-Jan-03 8:23
Paul Riley29-Jan-03 8:23 
GeneralRe: Security Issue HELP !!! ... Pin
leppie29-Jan-03 8:25
leppie29-Jan-03 8:25 
GeneralRe: Security Issue HELP !!! ... Pin
Dato29-Jan-03 12:18
Dato29-Jan-03 12:18 
GeneralRegex help Pin
Ed K29-Jan-03 7:20
Ed K29-Jan-03 7:20 
GeneralRe: Regex help Pin
JanZ29-Jan-03 7:49
JanZ29-Jan-03 7:49 
GeneralRe: Regex help - more detail! Pin
Ed K29-Jan-03 8:25
Ed K29-Jan-03 8:25 
GeneralRe: Regex help Pin
perlmunger30-Jan-03 8:19
perlmunger30-Jan-03 8:19 
The simple answer to this question is to use a delimiter you know won't be used within quoted strings when you generate your file in the first place. If that won't work then make sure that all of your fields are surrounded by quotes and use "," as your delimiter. Beyond that, what you want is possible, but it doesn't have a simple solution. You could go through and extract each quoted field first removing the field as you go, and then capture what's left. Or, you could create a regular expression and use it as a template. It seems to me that the data for each row should be the same basic pattern with each, but you corrent me if I'm wrong. For instance, if your record looks like this:

BT2921893081,071200000006,"Duck, Donald",539485988

Then your next record probably has the same patter but with different values such as:

BT2677793081,071200444006,"Mouse, Mickey",539488888

In that case a regular expresion like this:

/([^,]+),([^,]+),\"([^\"]+)\",(.+)/

shoudl work. I'm not sure how well you know regex. I am most familiar with a perl regex, but I think that perl regexes is what C#'s were based on. Once you run your string through this expression, you should have the items in your capture variables 1-4. Does that makes sense?

Hope this helps. Good luck.

-Matt

------------------------------------------

The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
GeneralYou gotta be kiddin me Pin
antoine@orchus-tech29-Jan-03 7:13
antoine@orchus-tech29-Jan-03 7:13 
GeneralRe: You gotta be kiddin me Pin
matthias s.29-Jan-03 9:11
matthias s.29-Jan-03 9:11 
GeneralRe: You gotta be kiddin me Pin
antoine@orchus-tech29-Jan-03 11:26
antoine@orchus-tech29-Jan-03 11:26 
GeneralRe: You gotta be kiddin me Pin
matthias s.29-Jan-03 18:17
matthias s.29-Jan-03 18:17 
General.NET AutoUpdate Pin
Jonathan Austin29-Jan-03 6:48
Jonathan Austin29-Jan-03 6:48 
GeneralRe: .NET AutoUpdate Pin
Paul Ingles29-Jan-03 14:55
Paul Ingles29-Jan-03 14:55 
GeneralRe: .NET AutoUpdate Pin
Jonathan Austin29-Jan-03 14:59
Jonathan Austin29-Jan-03 14:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.