Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

Browse by Tags

All Tags » html » replace
  • Convert BBCode, [color] tags, to HTML

    Greetings.  I have some problems using a Regex replace for converting the following BBCode: string bbCode = " [ color=red]Red[/color]"; Regex regExp = new Regex(@"\[ color=([^\]]+)\]([^\]]+)\[\/color\]"); string htmlCode = regExp.Replace(bbCode, "<span style=\'color: $1\'>$2</span>'); Essentially, ...
    Posted to Construction Advice (Forum) by Bassiq on April 7, 2008
  • Re: alt tag search / relpace in Dreamweaver

    I don't own Dreamweaver, but I'll try to help you anyway. Try (<img\b[^>]*?\salt\s*=\s*"[^"]*) in the find field and $1 | appended text here in the replace field. This should also work, if the alt attribute comes after an href attribute.
    Posted to Construction Advice (Forum) by eSquire on April 27, 2007
  • Ignoring things in HTML tags

    I would like to make a find/replace Regexp that ignores matches found inside HTML tags. Is there a simple way to do this?   (In case it matters, I'm talking about javascript.) 
    Posted to Construction Advice (Forum) by oliver on December 15, 2006