I'm trying to figure out how to replace the src property in an image tag at a specific location.
I have this string that is coming from the database.
The library will be closed today.
<img id="fjs48b94-1" src="(imageTag)" alt="png" />
<br />
Please use this online tool to check-in and check-out material.
<img id="fjs44213-4" src="(imageTag)" alt="gif" />
<br />Contact Us for any questions.
<img id="fjs22643-9" src="(imageTag)" alt="jpg" />
The src properties are all the same, src="(imageTag)" I need to replace with something real...like this:
The library will be closed today.
<img id="fjs48b94-1" src="http://fsu-libs.org/images/fjs48b94-1.png" />
<br />
Please use this online tool to check-in and check-out material.
<img id="fjs44213-4" src="http://fsu-libs.org/images/fjs44213-4.gif" />
<br />Contact Us for any questions.
<img id="fjs22643-9" src="http://fsu-libs.org/images/fjs22643-9.jpg" />
I played around with the String.Replace function like this:
Dim newText = originalString.Replace("src=""(imageTag)""", "src="http://fsu-libs.org/images/fjs22643-9.jpg"")
but that won't replace the text at the proper location since the string contains multiple instances of src="(imageTag)"
Is there any function in vb.net that can do this?