I need a clever regex to match ...
in these:
<img src="..."
<img src='...'
<img src=...
I want to match the inner content of src
, but only if it is surrounded by ", ' or none. This means that <img src=..."
or <img src='...
must not be accepted.
Any ideas how to match these 3 cases with one regex.
So far I use something like this ("|'|[\s\S])(.*?)\1
and the part that I want to get loose is the hacky [\S\s]
which I use to match "missing symbol" on the beginning and the end of the ...
.