Search Results

Search found 2 results on 1 pages for 'matthewpe'.

Page 1/1 | 1 

  • Replacing specific HTML tags using Regex

    - by matthewpe
    Alright, an easy one for you guys. We are using ActiveReport's RichTextBox to display some random bits of HTML code. The HTML tags supported by ActiveReport can be found here : http://www.datadynamics.com/Help/ARNET3/ar3conSupportedHtmlTagsInRichText.html An example of what I want to do is replace any match of <div style="text-align:*</div> by <p style=\"text-align:*</p> in order to use a supported tag for text-alignment. I have found the following regex expression to find the correct match in my html input: <div style=\"text-align:(.*?)</div> However, I can't find a way to keep the previous text contained in the tags after my replacement. Any clue? Is it me or Regex are generally a PITA? :) private static readonly IDictionary<string, string> _replaceMap = new Dictionary<string, string> { {"<div style=\"text-align:(.*?)</div>", "<p style=\"text-align:(.*?)</p>"} }; public static string FormatHtml(string html) { foreach(var pair in _replaceMap) { html = Regex.Replace(html, pair.Key, pair.Value); } return html; } Thanks!

    Read the article

  • CruiseControl.NET : Sending email using SVN username to ActiveDirectory mapping

    - by matthewpe
    Is it possible to configure CruiseControl.NET to send an email to the user(s) that did modifications to a broken build by mapping their SVN username to the corresponding Active-Directory alias (hence retrieving the correct, updated email address). Our SVN server is set-up to allow users of a certain Active-Directory group to read and commit changes: I don't want to have to maintain the CruiseControl.NET config every time a user gets added to our Programmers group in Active-Directory. Thanks a lot!

    Read the article

1