1 Reply Latest reply on Dec 7, 2009 8:16 AM by msakrejda

    Regular expressions for VALIDATE AN URL

    Dileep_NR Level 2

      Hi All,


      I am using the following reg expression for validating an URL


      var pattern:RegExp = /^(http)s?:\/\/[a-z0-9-\.]+\.[a-z]{2,4}\/?([^\s<>\#%"\,\{\}\\|\\\^\[\]`]+)?$/;


      But gives success result for  both the URL's given below


      1) http://www.googlecom(with out dot symbol)
      2) http://www.google.com(with dot symbol)



      Please help


      Thanks in advance