Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

~
https?://(?|media\.giphy\.com/media/([^ /\n]+)/giphy\.gif|i\.giphy\.com/([^ /\n]+)\.gif|giphy\.com/gifs/(?:.*-)?([^ /\n]+))
~
ig

Description

Get the ID from the multiple Giphy URLs

Submitted by anonymous - 8 years ago