Neh Agarwal wrote:I found the problem, I had to allow words and / so I changed it as:
^(/\\w+)+$
It works!
Thanks all!
Great to hear it works, anyway you are confusing between regular expression
string and with how to put it to
Java code to have that string value.
The code ^(/\\w+)+$ is a coding way of to ask Java to initialise a string with value ^(/\w+)+$.
If you talk about regular expression, it should be ^(/\w+)+$.
If you talk about coding then it should be as below because it's how you code.
Please don't confuse it when you talk about regular expression.
Cheers,
Duc