Commits

Sergey Astanin committed a059d99

Fixed: URL regex which doesn't match 3rd level domains

Comments (0)

Files changed (2)

 Name:          Bitly
-Version:       0.0.2
+Version:       0.0.3
 Cabal-version: >= 1.2
 Build-type:    Simple
 
     Left _ -> return url
     Right url' -> return url'
 
-urlRE = "(http|ftp|https)://\\w+(\\.\\w+)(:[0-9]+)?(/\\S+)?/?"
+urlRE = "(http|ftp|https)://\\w+(\\.\\w+)+(:[0-9]+)?(/\\S+)?/?"
 
 passThrough :: (String -> IO Result) -> String -> IO String
 passThrough op txt =