I need a regular expression to match the next pattern : \server\root\
So if the path is longer such as \\server\root\subroot it is not matched.
I need a regular expression to match the next pattern : \server\root\ So if
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Check that the required pattern occurs at the start of the string, and at the end of the string (i.e. nothing follows it).
You will most likely have to escape the slashes, hence the double
\\.If the requirement is to match any two-level path ,the following might be useful