$text =~ s#src="(?!\w+://)([^"]*)"#src="$url$1"#ig;
There's no need to escape the quotes, and it's more efficient to change the .*? to [^"]*. Then you don't need the /s either.
Abigail
In reply to Re: Help with Regex: (Absolute/Relative URLs)
by Abigail-II
in thread Help with Regex: (Absolute/Relative URLs)
by OverlordQ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |