For Example C#,
string InputStr = "<img src='http://localhost:8081/mySite/assets/0/14/image.jpg' alt='Graphic.jpg' title='Graphic.jpg' />"
I would like to make the above image url relative in the InputStr and want to strip "http://localhost:8081" from "src" attribute and output should look like the below html <img> tag
Expected OutputStr = "<img src='/mySite/assets/0/14/image.jpg'
alt='Graphic.jpg' title='Graphic.jpg' />"
I would appreciate if somebody could provide me with regex to match and replace. The src attribute might be localhost or server name and different port for example
<img src='http://webserver:81/mySite/assets/0/14/image.jpg' alt='Graphic.jpg' title='Graphic.jpg' />
...
Go to the complete details ...