Hi guys,
I am stumped by an utterly simple RegEx!![[3eyes] [3eyes] [3eyes]](/data/assets/smilies/3eyes.gif)
This is what I am trying to do:
I am transforming a text file into XML for further editing.
In this process, I want to protect certain codes, that are all roughly like this: 0B1234.
They may be all digits or digits and upper case characters mixed. They may be 4 characters long or 5 or 6 or more.
But they are all digits and upper case chars only, and all are followed by a space.
This is how I try to catch them:
Simple: match all combinations of digits and upper case char that are at least 3 chars long.
Guess what: it doesn't work!
Why?
![[ponder] [ponder] [ponder]](/data/assets/smilies/ponder.gif)
I have Regular Expression Laboratory to test such things and it too will say NAY.
I don't get it!
I can only do greedy or lazy matches but not "at least 3".
Thanks for any hint!
Cheers,
MakeItSo
[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
I am stumped by an utterly simple RegEx!
![[3eyes] [3eyes] [3eyes]](/data/assets/smilies/3eyes.gif)
This is what I am trying to do:
I am transforming a text file into XML for further editing.
In this process, I want to protect certain codes, that are all roughly like this: 0B1234.
They may be all digits or digits and upper case characters mixed. They may be 4 characters long or 5 or 6 or more.
But they are all digits and upper case chars only, and all are followed by a space.
This is how I try to catch them:
Code:
RE.Pattern = "([0-9A-Z]{3;})( )"
Guess what: it doesn't work!
Why?
![[ponder] [ponder] [ponder]](/data/assets/smilies/ponder.gif)
I have Regular Expression Laboratory to test such things and it too will say NAY.
I don't get it!
I can only do greedy or lazy matches but not "at least 3".
Thanks for any hint!
Cheers,
MakeItSo
[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell