CodeHighlighter.addStyle("css", {
    comment : {
        exp  : /\/\*[^*]*\*+([^\/][^*]*\*+)*\//
    },
    keywords : {
        exp  : /@\w[\w\s]*/
    },
    selectors : {
        exp  : "([\\w-:\\[.#][^{};>]*)(?={)"
    },
    properties : {
        exp  : "([\\w-]+)(?=\\s*:)"
    },
    units : {
        exp  : /([0-9])(em|en|px|%|pt)\b/,
        replacement : "$1<span class=\"$0\">$2</span>"
    },
    urls : {
        exp  : /url\([^\)]*\)/
    }
 });

CodeHighlighter.addStyle("html", {
    comment : {
        exp: /&lt;!\s*(--([^-]|[\r\n]|-[^-])*--\s*)&gt;/
    },
    tag : {
        exp: /(&lt;\/?)([a-zA-Z]+\s?)/,
        replacement: "$1<span class=\"$0\">$2</span>"
    },
    string : {
        exp  : /'[^']*'|"[^"]*"/
    },
    attribute : {
        exp: /\b([a-zA-Z-:]+)(=)/,
        replacement: "<span class=\"$0\">$1</span>$2"
    },
    doctype : {
        exp: /&lt;!DOCTYPE([^&]|&[^g]|&g[^t])*&gt;/
    }
});

CodeHighlighter.addStyle("irb",{
    comment : {
        exp  : /#[^\n]*/
    },
    prompt : {
        exp  : /(^\$)|(&gt;&gt;)/
    },
    result_prompt : {
        exp  : /\n=&gt;\s/
    },
    brackets : {
        exp  : /\(|\)|\[|\]|\{|\}/
    },
    string : {
        exp  : /'[^']*'|"[^"]*"/
    },
    keywords : {
        exp  : /\b(do|end|self|class|def|if|module|yield|then|else|for|until|unless|while|elsif|case|when|break|retry|redo|rescue|require|raise)\b/
    },
    constants : {
      exp  : /\b(true|false|__[A-Z][^\W]+|[A-Z]\w+)\b/
    },
    symbol : {
      exp  : /:[^\W]+/
    },
    instance : {
      exp  : /@+[^\W]+/
    },
    method : {
      exp  : /[^\w]*\.(\w*)[!?]*/
    }
});

CodeHighlighter.addStyle("javascript",{
    comment : {
        exp  : /(\/\/[^\n]*\n)|(\/\*[^*]*\*+([^\/][^*]*\*+)*\/)/
    },
    brackets : {
        exp  : /\(|\)/
    },
    string : {
        exp  : /'[^']*'|"[^"]*"/
    },
    keywords : {
        exp  : /\b(arguments|break|case|continue|default|delete|do|else|false|for|function|if|in|instanceof|new|null|return|switch|this|true|typeof|var|void|while|with|try|catch|throw)\b/
    },
    global : {
        exp  : /\b(toString|valueOf|window|element|prototype|constructor|document|escape|unescape|parseInt|parseFloat|setTimeout|clearTimeout|setInterval|clearInterval|NaN|isNaN|Infinity)\b/
    }
});

CodeHighlighter.addStyle("ruby",{
    comment : {
        exp  : /#[^\n]*/
    },
    brackets : {
        exp  : /\(|\)|\[|\]|\{|\}/
    },
    string : {
        exp  : /'[^']*'|"[^"]*"/
    },
    keywords : {
        exp  : /\b(do|end|self|class|def|if|module|yield|then|else|for|until|unless|while|elsif|case|when|break|retry|redo|rescue|require|raise)\b/
    },
    constants : {
      exp  : /\b(true|false|__[A-Z][^\W]+|[A-Z]\w+)\b/
    },
    symbol : {
      exp  : /:[^\W]+/
    },
    instance : {
      exp  : /@+[^\W]+/
    },
    method : {
      exp  : /[^\w]*\.(\w*)[!?]*/
    }
});

CodeHighlighter.addStyle("sh",{
    comment : {
        exp  : /#[^\n]*/
    },
    brackets : {
        exp  : /\(|\)|\[|\]|\{|\}/
    },
    string : {
        exp  : /'[^']*'|"[^"]*"/
    },
    prompt : {
        exp  : /(^\$)|(\n\$)/
    }
});

CodeHighlighter.addStyle("yaml",{
    comment : {
       exp  : /;[^\n]*/
    },
    symbol : {
      exp  : /(|\n\s+)\w+:/
    },
    brackets : {
        exp  : /\(|\)|\[|\]|\{|\}/
    },
    string : {
        exp  : /'[^']*'|"[^"]*"/
    }
});

CodeHighlighter.addStyle("rhtml", {
    comment : {
        exp: /&lt;!\s*(--([^-]|[\r\n]|-[^-])*--\s*)&gt;/
    },
    rcode : {
       exp: /&lt;%(|=|-)[^%]*(|-)%&gt;/
   }
});
CodeHighlighter.addStyle("c++",{
    comment : {
        exp  : /(\/\/[^\n]*\n)|(\/\*[^*]*\*+([^\/][^*]*\*+)*\/)/
    },
    brackets : {
          exp  : /\(|\)|\{|\}/
    },
    string : {
        exp  : /'[^']*'|"[^"]*"/
    },
    keywords : {
        exp  : /\b(break|case|continue|class|default|delete|do|else|false|for|if|new|return|switch|this|true|typeof|var|void|while|int|float|double|boolean|char|NULL|try|catch|throw|private|public|protected|continue|break|template|auto|register)\b/
    }
});

