regular expression for url validation handle multiple forward slashes using java -
i want validate below mention url using java
"http://localhost//app/page1/result"
my validation condition here dont want allow (multiple) forward slashes. means after localhost 2 forward slashes came want validate , throw exception.
if(url.isvalid){ .. }
don't allow forward slashes place except after schema.
i tried urlvalidator, java.net.uri replace slashes return original url. want throw exception dont want replace it.
please me
thanks
sanjay
Comments
Post a Comment