Click here to Skip to main content
15,922,533 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How do I "find first" and "Find next" from VB 6 in VB 2010 Pin
Dave Kreskowiak29-Jul-10 18:05
mveDave Kreskowiak29-Jul-10 18:05 
GeneralRe: How do I "find first" and "Find next" from VB 6 in VB 2010 Pin
Jaco Muller29-Jul-10 18:26
Jaco Muller29-Jul-10 18:26 
GeneralRe: How do I "find first" and "Find next" from VB 6 in VB 2010 Pin
Dave Kreskowiak30-Jul-10 8:09
mveDave Kreskowiak30-Jul-10 8:09 
QuestionRegular Expressions Failure Pin
Sonhospa29-Jul-10 15:05
Sonhospa29-Jul-10 15:05 
AnswerRe: Regular Expressions Failure Pin
Dave Kreskowiak29-Jul-10 18:01
mveDave Kreskowiak29-Jul-10 18:01 
GeneralRe: Regular Expressions Failure Pin
Sonhospa29-Jul-10 21:03
Sonhospa29-Jul-10 21:03 
GeneralRe: Regular Expressions Failure Pin
Dave Kreskowiak30-Jul-10 8:11
mveDave Kreskowiak30-Jul-10 8:11 
GeneralRe: Regular Expressions Failure Pin
Sonhospa30-Jul-10 23:43
Sonhospa30-Jul-10 23:43 
Thanks again, Dave.

Yes, I did look at that, and the key-value-pair regex works perfectly well. This would have been the second step that I mentioned in my question - I just wanted to reduce my question to the main point... If I could make the "Entr" group in my question have any content at all, I could easily replace it with the key-value-pair regex.

The problem is that I get either the "Grp" group (alone) or the key-value-pair (alone) matched. It seems that the \[ and \] literals do something out of (my Wink | ;) ) control, which I also can't find in the reference. The funny thing is that the full match that the regex in my question finds only contains the first group with the surrounding [] brackets, so that the second group must be empty. Did you check it out in Expresso?

The full regex including the key-value-pair would be:
\[(?<Grp>.*)\].(?<Keyword>\w+)\s*=\s*(?<Value>.*)((?=\W$)|\z)
Result:
- I get all the groups matched from my file example if I only test the first part (including the \] literal). The "Entr" group has the CR then, but not the following lines (i.e. none of the key-value-pairs)
- I get all the key-value-pairs matched if I only run a match on the second part, beginning from the Keyword-group.

Between the first and the second part of the regex is only a CR existing, which I try to match with the "." (=any character / once). But I get no match at all if I run the match like this.
AnswerRe: Regular Expressions Failure Pin
Peter_in_278029-Jul-10 18:03
professionalPeter_in_278029-Jul-10 18:03 
GeneralRe: Regular Expressions Failure Pin
Sonhospa29-Jul-10 21:20
Sonhospa29-Jul-10 21:20 
AnswerRe: Regular Expressions Failure Pin
Luc Pattyn29-Jul-10 23:58
sitebuilderLuc Pattyn29-Jul-10 23:58 
NewsPartially Resolved: Regular Expressions Failure Pin
Sonhospa31-Jul-10 0:57
Sonhospa31-Jul-10 0:57 
GeneralRe: Partially Resolved: Regular Expressions Failure Pin
Prerak Patel21-Sep-10 1:56
professionalPrerak Patel21-Sep-10 1:56 
QuestionCrystal Reports - Printing Lables Pin
David Mujica29-Jul-10 8:10
David Mujica29-Jul-10 8:10 
AnswerRe: Crystal Reports - Printing Lables Pin
Steven J Jowett30-Jul-10 0:02
Steven J Jowett30-Jul-10 0:02 
QuestionMime Encoding Pin
Steven J Jowett28-Jul-10 21:59
Steven J Jowett28-Jul-10 21:59 
AnswerRe: Mime Encoding Pin
Eddy Vluggen28-Jul-10 22:31
professionalEddy Vluggen28-Jul-10 22:31 
GeneralRe: Mime Encoding Pin
Steven J Jowett28-Jul-10 22:35
Steven J Jowett28-Jul-10 22:35 
QuestionSearch within a DataGridView Pin
Member 442053428-Jul-10 21:19
Member 442053428-Jul-10 21:19 
AnswerRe: Search within a DataGridView Pin
DaveAuld28-Jul-10 21:36
professionalDaveAuld28-Jul-10 21:36 
GeneralRe: Search within a DataGridView Pin
Member 442053428-Jul-10 22:20
Member 442053428-Jul-10 22:20 
GeneralRe: Search within a DataGridView Pin
DaveAuld28-Jul-10 22:40
professionalDaveAuld28-Jul-10 22:40 
GeneralRe: Search within a DataGridView Pin
Eddy Vluggen28-Jul-10 22:42
professionalEddy Vluggen28-Jul-10 22:42 
QuestionPassing variables to an Update Sql Statement in VBA/Excdel Pin
TheJudeDude28-Jul-10 11:24
TheJudeDude28-Jul-10 11:24 
QuestionProblems with youtube search Pin
User 584223728-Jul-10 7:42
User 584223728-Jul-10 7:42 

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.