I have a multiline text box which contains below string URLs:
http://foodfacts.ambigouos.com
http://articles.ambigouos.com
http://www.dirtshirt.org
I want to replace/update a string http to https from the above URLs which has ambigouos.com as a domain with Regex.
Expected output:
https://foodfacts.ambigouos.com
https://articles.ambigouos.com
http://www.dirtshirt.org
Below code tried but not working:
multilinebox.text = Regex.Replace(multilinebox.text, @"^http?://[a-zA-Z]*(\.ambigouos\.com)$", "$1", RegexOptions.IgnoreCase);
Thanks in advance.
Below code tried but not workingHow specifically is it not working?not working?http://orhtt://, right?.Contains("ambigouos.com")and then do.Replace("http://", "https://")