Posted By

krisdb on 10/06/09


Tagged

c-sharp


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

vali29
khouser


Regex.Replace


 / Published in: C#
 

  1. string text = Regex.Replace(contentToReplace, @"(what to replace in content)", "what to replace with", RegexOptions.Singleline | RegexOptions.IgnoreCase)
  2.  
  3. Regex.Replace(Sitecore.Web.WebUtil.GetRawUrl(), "\\s*Types/[0-9a-zA-Z]+", "Types/Audio", RegexOptions.Multiline | RegexOptions.IgnoreCase)

Report this snippet  

You need to login to post a comment.