Click here to Skip to main content
15,904,023 members
Home / Discussions / C#
   

C#

 
GeneralRe: Excel Cells are not readable if hidden Pin
Moreno Airoldi10-Aug-09 23:06
Moreno Airoldi10-Aug-09 23:06 
QuestionControl Listner Pin
satsumatable9-Aug-09 20:39
satsumatable9-Aug-09 20:39 
AnswerRe: Control Listner Pin
Pete O'Hanlon10-Aug-09 1:42
mvePete O'Hanlon10-Aug-09 1:42 
QuestionLogic I use.......?? Pin
Hum Dum9-Aug-09 20:35
Hum Dum9-Aug-09 20:35 
AnswerRe: Logic I use.......?? Pin
PIEBALDconsult9-Aug-09 20:42
mvePIEBALDconsult9-Aug-09 20:42 
GeneralRe: Logic I use.......?? Pin
Hum Dum9-Aug-09 21:01
Hum Dum9-Aug-09 21:01 
GeneralRe: Logic I use.......?? Pin
PIEBALDconsult9-Aug-09 21:19
mvePIEBALDconsult9-Aug-09 21:19 
GeneralRe: Logic I use.......?? Pin
Hum Dum9-Aug-09 21:59
Hum Dum9-Aug-09 21:59 
GeneralRe: Logic I use.......?? Pin
Pete O'Hanlon9-Aug-09 22:24
mvePete O'Hanlon9-Aug-09 22:24 
GeneralRe: Logic I use.......?? Pin
PIEBALDconsult10-Aug-09 5:59
mvePIEBALDconsult10-Aug-09 5:59 
GeneralRe: Logic I use.......?? Pin
Hum Dum11-Aug-09 20:35
Hum Dum11-Aug-09 20:35 
GeneralRe: Logic I use.......?? Pin
PIEBALDconsult12-Aug-09 4:09
mvePIEBALDconsult12-Aug-09 4:09 
QuestionComboboxes in DataGrid Pin
AmbitiousBeginner9-Aug-09 20:31
AmbitiousBeginner9-Aug-09 20:31 
AnswerRe: Comboboxes in DataGrid Pin
PIEBALDconsult9-Aug-09 20:46
mvePIEBALDconsult9-Aug-09 20:46 
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 

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.