I have an image tag with a src and I want to prepend a website url onto the src but only if it doesn’t start with http://. so far I have
content.replace(/(<img *src=")(.*?)"/, '$1' + this.websiteUrl + '$2"');
but I don’t know how to do the not starting with http:// bit
Use a negative lookahead: