Regular Expressions 101

Community Patterns

Extract any http https and any url form

0

Regular Expression
PCRE (PHP <7.3)

~
\b(?:https?://)?(?:(?i:[a-z]+\.)+)[^\s,]+\b
~
g

Description

This will help you to extract any URL inside your text

Submitted by Abdullah Alweheid - a year ago