Regular expression to find URLs within a string

前端 未结 27 2032
被撕碎了的回忆
被撕碎了的回忆 2020-11-22 14:18

Does anyone know of a regular expression I could use to find URLs within a string? I\'ve found a lot of regular expressions on Google for determining if an entire string is

27条回答
  •  一向
    一向 (楼主)
    2020-11-22 14:40

    This is a simplest one. which work for me fine.

    %(http|ftp|https|www)(://|\.)[A-Za-z0-9-_\.]*(\.)[a-z]*%
    

提交回复
热议问题