Click here to Skip to main content
15,886,199 members
Home / Discussions / C#
   

C#

 
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 
GeneralIcons desktop position Pin
zedust_fr29-Jan-03 5:12
zedust_fr29-Jan-03 5:12 
GeneralCasting Types! Or Not :( Pin
FruitBatInShades29-Jan-03 2:51
FruitBatInShades29-Jan-03 2:51 
GeneralRe: Casting Types! Or Not :( Pin
Philip Fitzsimons29-Jan-03 3:35
Philip Fitzsimons29-Jan-03 3:35 
GeneralRe: Casting Types! Or Not :( Pin
FruitBatInShades29-Jan-03 3:40
FruitBatInShades29-Jan-03 3:40 
GeneralRe: Casting Types! Or Not :( Pin
Philip Fitzsimons29-Jan-03 3:43
Philip Fitzsimons29-Jan-03 3:43 
GeneralRe: Casting Types! Or Not :( Pin
Richard Deeming29-Jan-03 4:46
mveRichard Deeming29-Jan-03 4:46 
QuestionHow to convert a C# project into an UML diagram Pin
Frankie Leung28-Jan-03 20:42
Frankie Leung28-Jan-03 20:42 
AnswerRe: How to convert a C# project into an UML diagram Pin
Philip Fitzsimons29-Jan-03 3:36
Philip Fitzsimons29-Jan-03 3:36 
GeneralRe: How to convert a C# project into an UML diagram Pin
Frankie Leung29-Jan-03 17:09
Frankie Leung29-Jan-03 17:09 
GeneralMedian Filter Pin
keem28-Jan-03 19:18
keem28-Jan-03 19:18 

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.