Regular Expressions 101

Community Patterns

Replace Spaces in href and src attributes

1

Regular Expression
PCRE (PHP <7.3)

/
(src|href)\s*=\s*"[^" ]*\K\h|(?!^)\G[^" ]*\K\h
/
g

Description

no description available

Submitted by anonymous - 8 years ago