Issue with my regular expression?

Posted by Rubans on Stack Overflow See other posts from Stack Overflow or by Rubans
Published on 2010-03-18T15:00:28Z Indexed on 2010/03/18 15:01 UTC
Read the original article Hit count: 297

Filed under:
|

I'm trying to locate the number matches in a relative path for directory up references("..\"). So I have the following pattern : "(..\)" which works as expected for the path "....\a\b" where it will give me 2 successfull groups ("..\") but when I try the path "..\a\b" it will also return 2 when it should be 1. I tried this in a reg ex tool such Expresso and it seems to work as expected in there but not in in .net, any ideas?

© Stack Overflow or respective owner

Related posts about c#

Related posts about regex