O
O-('' Q)
In my effort to fully understand how to use the RegExp engine in c#.net
(VS2005), I have begun to tinker with it more since I was shown about
the ability the other day in a lengthy newsgroup discussion by Jon
Skeet
(http://groups.google.com/group/micr...Anyone+know+how&rnum=9&hl=en#889b79e800a05dad).
I had not known about regular expressions in c# until that point.
Anyway, here is what I am trying to do:
Example Input: displaycopy('2,10,9,15')
Example Output: 2,10,9,15
Basically, trying to ignore the word "displaycopy" and anything that is
not a number or a comma. What I have come up with so far for a pattern
is this:
Regex re = new Regex("displaycopy\" *.\"([^(]*)");
However, it does not work as I am sure you've guessed by now.
I feel I *may* be close to using this properly, but still need a bit of
guidance with it. I am sure it is also possible that my attempt is
completely and utterly WRONG. But, this is part of learning and I am
sure the fine folks in this newsgroup (Jon included) will be able to
help me solve this puzzle.
Thanks in advance all.
-- Kirby
(VS2005), I have begun to tinker with it more since I was shown about
the ability the other day in a lengthy newsgroup discussion by Jon
Skeet
(http://groups.google.com/group/micr...Anyone+know+how&rnum=9&hl=en#889b79e800a05dad).
I had not known about regular expressions in c# until that point.
Anyway, here is what I am trying to do:
Example Input: displaycopy('2,10,9,15')
Example Output: 2,10,9,15
Basically, trying to ignore the word "displaycopy" and anything that is
not a number or a comma. What I have come up with so far for a pattern
is this:
Regex re = new Regex("displaycopy\" *.\"([^(]*)");
However, it does not work as I am sure you've guessed by now.
I feel I *may* be close to using this properly, but still need a bit of
guidance with it. I am sure it is also possible that my attempt is
completely and utterly WRONG. But, this is part of learning and I am
sure the fine folks in this newsgroup (Jon included) will be able to
help me solve this puzzle.
Thanks in advance all.
-- Kirby