I have a string which contains a link that looks like this:
string source = "<img src='ftp://c//hafiz hussain//appdata//images//image.bmp' />"
I used the following regex to remove the src content:
string regexSrc = @"<img[^>]*?src\s*=\s*[""']?([^'"" >]+?)[ '""][^>]*?>";
MatchCollection matchesImgSrc = Regex.Matches(source , regexSrc, RegexOptions.IgnoreCase | RegexOptions.Singleline);
This is working fine, only if the folder name has no spaces. For the above case the matchesImgSrc[1].Groups[1].Value matches only till 'ftp://c//hafiz'
Content after the whitespace is ignored.
