Java Regular Expression question

1 view
Skip to first unread message

Mike

unread,
Apr 24, 2009, 12:08:40 AM4/24/09
to Regex
I need a regular expression in java to match a valid UNC path.

Something like -

\\servername.company.com\folder\subFolder\

There should be no drive name or ":" in the name.

\\\\[\\w+] captures the double slash and following word but i can't
seem to get the repeating sequence of "word\" working. I'd appreciate
any help.


Reply all
Reply to author
Forward
0 new messages