I have a program that I need to figure out what type of directory structure I'm working with. I have two possibilities. Either "C:dir1dir2dir3" or "\comp1Cdirdir2dir3" for our network. Well, I was trying to use regular expressions (complete newbie here) to match the 2nd possibility to locate the 4th "\". I came up with \\+.*\ as a pattern, but it isn't working quite right. Can anyone tell me what I'm doing wrong? If I have a string to test, I want to find the match above of "\comp1C\" and stop there. But right now, it's finding "\comp1Cdir\" Thanks.