Regular Expressions 101

Community Patterns

0

hk_ec_lanecrawford

PCRE2 (PHP >=7.3)
Submitted by Alex - 2 years ago
0

address

PCRE (PHP <7.3)
not sure
Submitted by anonymous - 2 years ago
0

IPv6

PCRE2 (PHP >=7.3)
small ipv6 regex
Submitted by anonymous - 2 years ago
0

regex_bl_fees_types

PCRE2 (PHP >=7.3)
guif
Submitted by guif - 2 years ago

best youtube id match ( iframe embed replace ready )

8

Regular Expression
Recommended
PCRE (PHP <7.3)

/
(?:https?:)?(?:\/\/)?(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube(?:-nocookie)?\.com\S*?[^\w\s-])([\w-]{11})(?=[^\w-]|$)(?![?=&+%\w.-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*
/
gim

Description

Loading markdown...
Submitted by mi-ca.ch - 5 years ago