Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
GeneralRe: Comboboxes in DataGrid Pin
AmbitiousBeginner9-Aug-09 20:52
AmbitiousBeginner9-Aug-09 20:52 
GeneralRe: Comboboxes in DataGrid Pin
PIEBALDconsult9-Aug-09 21:23
mvePIEBALDconsult9-Aug-09 21:23 
AnswerRe: Comboboxes in DataGrid Pin
stancrm9-Aug-09 20:48
stancrm9-Aug-09 20:48 
GeneralRe: Comboboxes in DataGrid Pin
AmbitiousBeginner9-Aug-09 21:18
AmbitiousBeginner9-Aug-09 21:18 
GeneralRe: Comboboxes in DataGrid Pin
stancrm9-Aug-09 21:22
stancrm9-Aug-09 21:22 
QuestionHow to update MS Access database in the installed application? Pin
Sifar - 09-Aug-09 17:38
Sifar - 09-Aug-09 17:38 
AnswerRe: How to update MS Access database in the installed application? Pin
Ennis Ray Lynch, Jr.9-Aug-09 18:27
Ennis Ray Lynch, Jr.9-Aug-09 18:27 
QuestionRegular Expressions [modified] Pin
Mikey_H9-Aug-09 17:29
Mikey_H9-Aug-09 17:29 
I am learning how to read text files at the moment, and it seems regular expressions is the way to go for what I need. I understand the concept but not quite sure how to implement it.

I have the line...

$2 USD NL Texas Hold'em - Sunday, August 09, 19:05:42 EDT 2009

...stored in a string. I would like to take certain parts of this and store them in seperate strings.
The data I need is...

NL Texas Hold'em
August 09
19:05:42
2009

Should I use something like "USD\s.*\s-" this would give me "USD NL Texas Hold'Em -"? After this I can then trim "USD " and " -" off the start and the end of the string and I will the information I need.

Regex rExp = new Regex("USD\\s.*\\s-");
Match match = rExp.Match(sLine1);

string gameType = match.Value;
gameType.TrimStart("USD ".ToCharArray());
gameType.TrimEnd(" -".ToCharArray());

switch (gameType)
{
      case "NL Texas Hold'em":
      // Do something
            break;
      default:
            break;
}


Is this a good way to approach the task? Are there better ways to do this?
Any help would be appreciated.

Thank you.

modified on Monday, August 10, 2009 1:18 AM

AnswerRe: Regular Expressions Pin
PIEBALDconsult9-Aug-09 21:33
mvePIEBALDconsult9-Aug-09 21:33 
GeneralRe: Regular Expressions Pin
Mikey_H10-Aug-09 9:30
Mikey_H10-Aug-09 9:30 
GeneralRe: Regular Expressions Pin
PIEBALDconsult10-Aug-09 9:53
mvePIEBALDconsult10-Aug-09 9:53 
QuestionUnable to send image on UDP larger than 10K Pin
atifmuzaffar9-Aug-09 15:55
atifmuzaffar9-Aug-09 15:55 
AnswerThis may sound silly but Pin
Ennis Ray Lynch, Jr.9-Aug-09 18:23
Ennis Ray Lynch, Jr.9-Aug-09 18:23 
AnswerRe: Unable to send image on UDP larger than 10K Pin
Luc Pattyn9-Aug-09 22:59
sitebuilderLuc Pattyn9-Aug-09 22:59 
QuestionRPG - character draw behind object problems [modified] Pin
jdneul9-Aug-09 11:12
jdneul9-Aug-09 11:12 
AnswerRe: RPG - character draw behind object problems Pin
Luc Pattyn9-Aug-09 11:41
sitebuilderLuc Pattyn9-Aug-09 11:41 
AnswerRe: RPG - character draw behind object problems Pin
harold aptroot9-Aug-09 12:28
harold aptroot9-Aug-09 12:28 
GeneralRe: RPG - character draw behind object problems Pin
jdneul9-Aug-09 12:59
jdneul9-Aug-09 12:59 
GeneralRe: RPG - character draw behind object problems Pin
Luc Pattyn9-Aug-09 13:05
sitebuilderLuc Pattyn9-Aug-09 13:05 
GeneralRe: RPG - character draw behind object problems Pin
harold aptroot9-Aug-09 13:14
harold aptroot9-Aug-09 13:14 
AnswerRe: RPG - character draw behind object problems Pin
jdneul10-Aug-09 4:40
jdneul10-Aug-09 4:40 
QuestionTalking to a telnet server [modified] Pin
shultas9-Aug-09 8:21
shultas9-Aug-09 8:21 
AnswerRe: Talking to a telnet server Pin
Randor 9-Aug-09 9:41
professional Randor 9-Aug-09 9:41 
GeneralRe: Talking to a telnet server Pin
shultas9-Aug-09 9:54
shultas9-Aug-09 9:54 
GeneralRe: Talking to a telnet server Pin
shultas9-Aug-09 10:00
shultas9-Aug-09 10:00 

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.