Website URL name regular expression validator

Java Best Website URL name regular expression validator


  • public class Utility {
  • public static boolean isValidURL(String url)
  •   {
  • String urlPattern = "^http(s{0,1})://[a-zA-Z0-9_/\\-\\.]+\\.([A-Za-z/]{2,5})[a-zA-Z0-9_/\\&\\?\\=\\-\\.\\~\\%]*";
  •     if (url.matches(urlPattern))
  •       return true;
  •     else return false;
  •   }
  • }

Comments

Popular posts from this blog

I get wrong characters when retreiving the message body of an email using TIdIMAP4.UIDRetrieveTextPeek2()

How to drop the all the 1's in a correlation matrix

Today Walkin 14th-Sept