I want to find all img tags in a string of text and put a surrounding link - a tag around it. What's the best way to do it? And I want to retrieve the src link and put in the href attribute.
By the way I'm doing it in C# but the way should be similar in ever开发者_JAVA技巧y language. Has anybody done such filtering and replacing? Any advice would be appreciated.
If you're parsing and dealing with raw HTML strings, I would highly recommend using the Html Agility Pack library.
How do you parse an HTML string for image tags to get at the SRC information?
精彩评论