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

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -