Hello All,
Regex is my weakest subject, looking for some help here..
I wish to replace:
<img src="domain.com/*">
// or
<img src="*.domain.com/*">
with a new subdomain..
<img src="http://sub.domain.com/*>
Of course compensating for:
- It may have http or may not at the beginning (may be relative)
- It must have http:// in the replacement
- anything after the domain could vary, subfolders, etc
- Bonus for me if it doesn't rely on exactly "img src" (allowing for img width= src=, etc)
I have been playing around with some expressions but to be honest they are too horrible to even post (yes, they are that bad) however I have been searching tutorials, etc but this is still to advanced for me..
Any help at all would be great!
Thanks in advance