Regular Expressions in c#

deicistdeicist Manchester, UK
edited September 2007 in Internet & Media
Hi all, I'm trying to teach myself regular expressions in C# but I've run into a problem. I'm trying to match any occurence of V(number) in a string, then remove v(number) from the string, then match the last occurence of (number) in the remaining string. I can do the first 2 bits no problem, by matching 'V[0-9]*' but when I try to match [0-9]* in the string it won't work...unless the number is right at the start of the string. for example:

blahblah67blah doesn't match
67blahblahblah does match

Any ideas? (sorry if none of that made sense, I can post source code of what I'm doing if required)

Comments

  • BLuKnightBLuKnight Lehi, UT Icrontian
    edited September 2007
    Hmm... I've never done regular expressions in C# before. Post the code and lets have a look.
  • MiracleManSMiracleManS Chambersburg, PA Icrontian
    edited September 2007
    I see what you're trying to do here. I had to do something similar not too long ago. If I can't figure this out, I know someone who can (and faster than I, in any case).
Sign In or Register to comment.