0

Hi i want to validate url in jquery so i am using that regex expression

if(/^(http|https|ftp):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/i.test(url)){
} else {
   $('#peUrl-'+index).prev('.errorHint').text("Please enter valid URL");    
}

But that regex expression is sometimes not working what is that issue in expression?

Balaguru Murugan
  • 463
  • 2
  • 7
  • 21

0 Answers0