I need to create regular expression that would validate path to file. It should approve such strings like:
c:\
c:\dir1\file.txt
c:\dir1\dir2\file.txt
and so on. I tried to create it.Result:
(c|C):(\\\w{0,8})*(\.\w{1,3})?
In gskinner everything OK, but when I compile this pattern in Java none of the previous rows are not tested.
Java code:
p = Pattern.compile("(c|C):(\\\w{0,8})*");
m = p.matcher(arguments);
result = m.matches();