Click here to Skip to main content
15,908,013 members
Home / Discussions / C#
   

C#

 
AnswerRe: Get what object a button belongs to? Pin
Luc Pattyn11-Aug-09 23:59
sitebuilderLuc Pattyn11-Aug-09 23:59 
AnswerRe: Get what object a button belongs to? Pin
Daniel Grunwald12-Aug-09 2:53
Daniel Grunwald12-Aug-09 2:53 
Questiontext box multiline Pin
Vivek Vijayan11-Aug-09 21:37
Vivek Vijayan11-Aug-09 21:37 
AnswerRe: text box multiline Pin
stancrm11-Aug-09 21:44
stancrm11-Aug-09 21:44 
AnswerRe: text box multiline Pin
Ashfield11-Aug-09 21:44
Ashfield11-Aug-09 21:44 
AnswerRe: text box multiline Pin
dan!sh 11-Aug-09 22:18
professional dan!sh 11-Aug-09 22:18 
QuestionException in access to textbox ? Pin
Mohammad Dayyan11-Aug-09 21:30
Mohammad Dayyan11-Aug-09 21:30 
AnswerRe: Exception in access to textbox ? Pin
stancrm11-Aug-09 21:40
stancrm11-Aug-09 21:40 
GeneralRe: Exception in access to textbox ? Pin
Mohammad Dayyan12-Aug-09 0:15
Mohammad Dayyan12-Aug-09 0:15 
AnswerRe: Exception in access to textbox ? Pin
Luc Pattyn12-Aug-09 0:01
sitebuilderLuc Pattyn12-Aug-09 0:01 
Questionthreading in a Custom Collection Pin
Juvil John11-Aug-09 21:29
Juvil John11-Aug-09 21:29 
AnswerRe: threading in a Custom Collection Pin
stancrm11-Aug-09 21:53
stancrm11-Aug-09 21:53 
GeneralRe: threading in a Custom Collection [modified] Pin
Juvil John11-Aug-09 22:51
Juvil John11-Aug-09 22:51 
AnswerRe: threading in a Custom Collection Pin
Nicholas Butler12-Aug-09 1:54
sitebuilderNicholas Butler12-Aug-09 1:54 
QuestionCustom Installation Pin
lune1211-Aug-09 21:05
lune1211-Aug-09 21:05 
Questionupdate:Edit datagridview Pin
abdolrab11-Aug-09 21:00
abdolrab11-Aug-09 21:00 
QuestionNetworkStream, possibly Read timeout? Pin
Trapper-Hell11-Aug-09 20:46
Trapper-Hell11-Aug-09 20:46 
GeneralDataSet DataTime Binding Issue Pin
VenkataRamana.Gali11-Aug-09 20:18
VenkataRamana.Gali11-Aug-09 20:18 
GeneralRe: DataSet DataTime Issue Pin
PIEBALDconsult11-Aug-09 20:23
mvePIEBALDconsult11-Aug-09 20:23 
GeneralRe: DataSet DataTime Issue Pin
VenkataRamana.Gali11-Aug-09 20:32
VenkataRamana.Gali11-Aug-09 20:32 
QuestionRegular Expression problem [possibly solved] [modified] Pin
PIEBALDconsult11-Aug-09 19:01
mvePIEBALDconsult11-Aug-09 19:01 
I thought I had my Regular Expression working just fine, but then I found a weakness...

First off, I'm trying to parse a command line, so a Regex may not be the best tool, but it's so close! (And it's fine for testing purposes anyway.)

Given a command line like:

command param1 /options=( option1 , "option 2" , option3 ) "param 2"

I have no trouble getting most of this. Generally the worst part is that I have to get the contents of the options all together,
e.g. " option1 , "option 2" , option3 ", but that's not a big deal, I can parse it separately.

What I'm stumped by now, is if an option is in quotes and contains a right-parenthesis:

/options=( "(trouble)" )

The related piece of the Regex I'm using is:

"(?:/\\s*(?'Switch'\\w+)(?:\\s*=\\s*(?:(?:\"(?'Value'[^\"]*)\")|(?:\\((?'Value'[^\\)]*)\\)))|(?'Value'\\w+))?)"

I want "(trouble)", I get "(trouble


Is there a way to get the Regex to recognize that the right-parenthesis is in quotes? I assume I need a balancing-group, but I can't wrap my head around it.

Edit:
I replaced ((?'Value'[^\\)]*) with (?'Value'(?:(?:\"[^\"]*\")|[^\\)]*?)*) and it seems to work.

modified on Wednesday, August 12, 2009 1:51 AM

QuestionHow to display a chart in PDF using C#? Pin
ravi.vellanky11-Aug-09 19:00
ravi.vellanky11-Aug-09 19:00 
AnswerRe: How to display a chart in PDF using C#? Pin
stancrm11-Aug-09 21:36
stancrm11-Aug-09 21:36 
QuestionMenu items to tab pages in tabcontrol Pin
elci11-Aug-09 18:46
elci11-Aug-09 18:46 
Questionfactory method Pin
jpk42011-Aug-09 18:25
jpk42011-Aug-09 18:25 

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.