Click here to Skip to main content
15,889,216 members
Home / Discussions / C#
   

C#

 
AnswerRe: I loose my time in config files Pin
Pete O'Hanlon15-Sep-14 20:43
mvePete O'Hanlon15-Sep-14 20:43 
AnswerRe: I loose my time in config files Pin
Richard MacCutchan15-Sep-14 21:26
mveRichard MacCutchan15-Sep-14 21:26 
AnswerRe: I loose my time in config files Pin
OriginalGriff15-Sep-14 22:33
mveOriginalGriff15-Sep-14 22:33 
AnswerRe: I loose my time in config files Pin
V.15-Sep-14 22:53
professionalV.15-Sep-14 22:53 
Questionlisten connection to sql database Pin
GIANGPZO15-Sep-14 16:27
professionalGIANGPZO15-Sep-14 16:27 
AnswerRe: listen connection to sql database Pin
Wendelius15-Sep-14 17:56
mentorWendelius15-Sep-14 17:56 
GeneralRe: listen connection to sql database Pin
GIANGPZO17-Sep-14 16:36
professionalGIANGPZO17-Sep-14 16:36 
QuestionRegEx grouping question Pin
SledgeHammer0115-Sep-14 13:51
SledgeHammer0115-Sep-14 13:51 
My input text is:

"the quick ${var1:a=b,c=d,e=f} brown fox ${var2:g=h,i=j,k=l}"

var1,var2 is a "variable"
a=b is considered a "parameter".

I can have any number of variables in the input string
I can have from 0 to any parameters (i.e. ${var1} is allowed)

My end result is I want to split as:

var1|a|b|c|d|e|f for the first match
var2|g|h|i|j|k|l for the 2nd match

The regex I'm using is:

\${([A-Za-z]+)(: ([A-Za-z]+)=([A-Za-z0-9]+)(,([A-Za-z]+)=([A-Za-z0-9]+))*)*} <=== NO SPACE after the colon (preventing smiley)

Right now I'm getting:

var1|a|b|e|f (and a few other groups I don't care about), but for discussion, the full split is: |var1|:a=b,c=d,e=f|a|b|,e=f|e|f

The problem is, it's grouping a&b and e&f, but its skipping c&d for some reason... if I add a 4th parameter, now it skips e&f too. I.e. it only shows the FIRST and LAST param.

What's going on?
AnswerRe: RegEx grouping question Pin
PIEBALDconsult15-Sep-14 14:29
mvePIEBALDconsult15-Sep-14 14:29 
AnswerRe: RegEx grouping question Pin
Kenneth Haugland15-Sep-14 16:07
mvaKenneth Haugland15-Sep-14 16:07 
GeneralRe: RegEx grouping question Pin
SledgeHammer0115-Sep-14 17:10
SledgeHammer0115-Sep-14 17:10 
GeneralRe: RegEx grouping question Pin
PIEBALDconsult15-Sep-14 18:19
mvePIEBALDconsult15-Sep-14 18:19 
GeneralRe: RegEx grouping question Pin
SledgeHammer0115-Sep-14 18:27
SledgeHammer0115-Sep-14 18:27 
GeneralRe: RegEx grouping question Pin
PIEBALDconsult15-Sep-14 18:38
mvePIEBALDconsult15-Sep-14 18:38 
QuestionGetPrintJobInfoCollection() Problem Pin
murali_utr15-Sep-14 3:52
murali_utr15-Sep-14 3:52 
AnswerRe: GetPrintJobInfoCollection() Problem Pin
OriginalGriff15-Sep-14 6:06
mveOriginalGriff15-Sep-14 6:06 
GeneralRe: GetPrintJobInfoCollection() Problem Pin
murali_utr15-Sep-14 17:02
murali_utr15-Sep-14 17:02 
QuestionMySQL Query, int column, datagridview show as System.Byte[] Pin
gonzaloleon15-Sep-14 3:20
gonzaloleon15-Sep-14 3:20 
QuestionRe: MySQL Query, int column, datagridview show as System.Byte[] Pin
Eddy Vluggen15-Sep-14 8:24
professionalEddy Vluggen15-Sep-14 8:24 
GeneralRe: MySQL Query, int column, datagridview show as System.Byte[] Pin
PIEBALDconsult15-Sep-14 8:48
mvePIEBALDconsult15-Sep-14 8:48 
GeneralRe: MySQL Query, int column, datagridview show as System.Byte[] Pin
gonzaloleon16-Sep-14 3:01
gonzaloleon16-Sep-14 3:01 
Questionhow to run Simple Instant Messenger Pin
Member 1108356315-Sep-14 3:11
Member 1108356315-Sep-14 3:11 
AnswerRe: how to run Simple Instant Messenger Pin
Pete O'Hanlon15-Sep-14 3:28
mvePete O'Hanlon15-Sep-14 3:28 
GeneralRe: how to run Simple Instant Messenger Pin
Member 1108356315-Sep-14 3:32
Member 1108356315-Sep-14 3:32 
QuestionImport and Export Excel Files into SQL with C#2005 ? Pin
Member 245846714-Sep-14 23:24
Member 245846714-Sep-14 23:24 

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.