I was trying out to create a regular expression to match file path in java like
C:\\abc\\def\\ghi\\abc.txt
I tried this ([
([
Use this regex:
"([a-zA-Z]:)?(\\\\[a-zA-Z0-9._-]+)+\\\\?";
I added two modifications: you forgot to add . for matching the file name abc.txt and backslash escaping (\\) was also needed.
.
abc.txt
\\