Click here to Skip to main content
15,900,378 members
Home / Discussions / C#
   

C#

 
QuestionHow to retreive particular data from a String? Pin
Aghosh Babu7-Feb-09 21:28
Aghosh Babu7-Feb-09 21:28 
QuestionRe: How to retreive particular data from a String? Pin
Eddy Vluggen8-Feb-09 0:42
professionalEddy Vluggen8-Feb-09 0:42 
AnswerRe: How to retreive particular data from a String? Pin
Aghosh Babu8-Feb-09 0:46
Aghosh Babu8-Feb-09 0:46 
GeneralRe: How to retreive particular data from a String? Pin
Eddy Vluggen8-Feb-09 0:52
professionalEddy Vluggen8-Feb-09 0:52 
GeneralRe: How to retreive particular data from a String? Pin
Aghosh Babu8-Feb-09 0:57
Aghosh Babu8-Feb-09 0:57 
AnswerRe: How to retreive particular data from a String? Pin
Eddy Vluggen8-Feb-09 1:04
professionalEddy Vluggen8-Feb-09 1:04 
GeneralRe: How to retreive particular data from a String? Pin
Aghosh Babu8-Feb-09 1:09
Aghosh Babu8-Feb-09 1:09 
AnswerRe: How to retreive particular data from a String? [modified] Pin
PIEBALDconsult8-Feb-09 3:01
mvePIEBALDconsult8-Feb-09 3:01 
I would use a Regular Expression to split the string. Is it always two lines per message? Or sometimes more?


This

System.Text.RegularExpressions.Regex reg = new System.Text.RegularExpressions.Regex
(
    "(?'A'[^:]*):\"(?'B'[^\"]*)\",,\"(?'C'[^\"]*)\",(?'D'[^\"]*)\"\n(?'E'[^\n]*)\n"
,
    System.Text.RegularExpressions.RegexOptions.Compiled |
    System.Text.RegularExpressions.RegexOptions.Singleline |
    System.Text.RegularExpressions.RegexOptions.CultureInvariant
) ;


is giving me:

A >+CMT<
B >+658208342<
C >09/02/08<
D >16:15:22+50<
E >Test Message from coder<


Did you leave out a quote in your data?

modified on Sunday, February 8, 2009 9:21 AM

GeneralRe: How to retreive particular data from a String? Pin
Aghosh Babu8-Feb-09 3:44
Aghosh Babu8-Feb-09 3:44 
GeneralRe: How to retreive particular data from a String? Pin
PIEBALDconsult8-Feb-09 3:53
mvePIEBALDconsult8-Feb-09 3:53 
GeneralRe: How to retreive particular data from a String? Pin
Aghosh Babu8-Feb-09 21:17
Aghosh Babu8-Feb-09 21:17 
GeneralRe: How to retreive particular data from a String? Pin
PIEBALDconsult9-Feb-09 3:26
mvePIEBALDconsult9-Feb-09 3:26 
AnswerRe: How to retreive particular data from a String? Pin
Guffa8-Feb-09 4:58
Guffa8-Feb-09 4:58 
Questionhow to receive a frame from serilal port Pin
hamed_farasat7-Feb-09 20:54
hamed_farasat7-Feb-09 20:54 
AnswerRe: how to receive a frame from serilal port Pin
hamed_farasat7-Apr-09 19:29
hamed_farasat7-Apr-09 19:29 
QuestionReading XML using DOM [modified] Pin
benjamin yap7-Feb-09 20:47
benjamin yap7-Feb-09 20:47 
AnswerRe: Reading XML using DOM Pin
Guffa7-Feb-09 21:08
Guffa7-Feb-09 21:08 
GeneralRe: Reading XML using DOM Pin
benjamin yap7-Feb-09 21:16
benjamin yap7-Feb-09 21:16 
GeneralRe: Reading XML using DOM Pin
ABitSmart7-Feb-09 23:25
ABitSmart7-Feb-09 23:25 
QuestionAppDomain pains: Specifying a relative directory not working fully. Pin
iAmEntity7-Feb-09 9:52
iAmEntity7-Feb-09 9:52 
AnswerRe: AppDomain pains: Specifying a relative directory not working fully. Pin
Eddy Vluggen8-Feb-09 0:47
professionalEddy Vluggen8-Feb-09 0:47 
GeneralRe: AppDomain pains: Specifying a relative directory not working fully. Pin
iAmEntity8-Feb-09 5:59
iAmEntity8-Feb-09 5:59 
GeneralRe: AppDomain pains: Specifying a relative directory not working fully. Pin
Eddy Vluggen8-Feb-09 6:31
professionalEddy Vluggen8-Feb-09 6:31 
GeneralRe: AppDomain pains: Specifying a relative directory not working fully. Pin
iAmEntity8-Feb-09 8:08
iAmEntity8-Feb-09 8:08 
Questionhow to write coding for login page in ASP dot net with c# coding???? Pin
karthimca1437-Feb-09 8:55
karthimca1437-Feb-09 8:55 

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.