Created on 11 January 2019
icon_unfollowing
Login to follow
extensions-for-replace-image-source

Extensions for replace image source

Stable version 1.0.0 (Compatible with OutSystems 11)
Also available for 10
Uploaded on 11 January 2019 by 
extensions-for-replace-image-source

Extensions for replace image source

Details
public static string FetchImgsFromSource(string htmlSource) { string OutSource = ""; string regexImgSrc = @"
Read more

public static string FetchImgsFromSource(string htmlSource)

        {

            string OutSource = "";

            string regexImgSrc = @"<img[^>]*?src\s*=\s*[""']?([^'"" >]+?)[ '""][^>]*?>";

            MatchCollection matchesImgSrc = Regex.Matches(htmlSource, regexImgSrc, RegexOptions.IgnoreCase | RegexOptions.Singleline);

            foreach (Match m in matchesImgSrc)

            {

                string href = m.Groups[1].Value;

                string imgvalue="";

                if (href.IndexOf("GUID=") != -1)

                {

                    int length_ = href.IndexOf("=");

                    imgvalue= href.Substring(length_+1);


                    htmlSource=htmlSource.Replace(href,"GetImg("+ imgvalue + ")");

                }





            }

            return OutSource= htmlSource;

        }

Release notes (1.0.0)
Reviews (0)
Category
User interface, Media
Tags
Support options
This asset is not supported by OutSystems. You may use the discussion forums to leave suggestions or obtain best-effort support from the community, including from  who created this asset.
Dependencies
Extensions for replace image source has no dependencies.
Application Objects
Extensions for replace image source has 0 AOs.
Team
Compatible with
Version 11
Version 10
Stack:
.NET
Database:
All
Asset consumers
No consumers yet.
Weekly downloads