Regular Expressions 101

Community Patterns

iframe src url

0

Regular Expression
ECMAScript (JavaScript)

/
src=(["'])(?<url>(?:https?:)?\/\/(?:(?!\1).)*?)\1
/
gm

Description

Extract the URL (http(s) only) of a given iframe's src attribute.

Submitted by Neill - 3 years ago (Last modified 3 years ago)