Regular Expressions 101

Library entries

Regex to replace SRC to DATA-SRC when class attribute contains lazy text

Vote

0

Regular Expression
pcre2

/
<img src=([a-zA-Z0-9_\-\s\.\"=\/:%,()]*class=\"[a-zA-Z0-9_\-\s\.\"=\/:%,()]*lazy[a-zA-Z0-9_\-\s\.\"=\/:%,()]*)
/
gm

Description

Loading markdown...
Submitted by Suman Maharjan - 6 months ago