The value of an img element's src property can be accessed directly:
alert(someImg.src);
The value is a string, so you can operate on it using string methods. The surrounding markup is irrelevant, the innerHTML representing the element might be different in different browsers so you should not be using that.
If you want to use a regular expression to change the value, then operate on the related DOM property directly.
You do not state what you want to do with the value, but perhaps you want to replace some part of it with some other, then given the markup:
<img id="img0" src="image-red.jpg">
You can change it to "image-blue.jpg" using:
var img = document.getElementById('img0');
img.src = img.src.replace(/-red/,'-blue');
but you could also just assign the new value:
img.src = 'image-blue.jpg';