regularexpressionhighlighter will render regular expressions on your page with javascript for a nicer display

  1. Short Description
  2. Authors
  3. Requirements
  4. Usage
  5. Resources

Short Description

Will add a Javascript based RegularExpression Syntaxhighlighter to Yii.


  • The colorization output is from: Steven Levithan
  • The dynamic hovering of brackets and so on is from: Jeff Roberson
  • The extension and functionWrapping is from me


No requirements - the javascript is bundled..

Yii-1.1 and firefox is tested.. so it might happen, that some parts don't work with ie..



This extension mostly doesn't need configuration - but if you want:

$cssFile; // will overwrite the colorcss-file from syntaxhighlighter - look at the original cssfile what you can change
$className = 'regex'; // css-classname which should be highlighted
public $dynamic = true; // if the dynamichighlighter should be included or only coloroutput
public $functionName; // if you don't want autoloading that script and toggle it by a function


Most important is that your regex lies within a container of class="regex" - then you just have to add the extension and it will work But this example will show you the functionName configuration

<input type="button" onclick="javascrip:regexHighlight()" value="Highlight or remove Highlight of that regex" />

<div class="regex" style="width:700px;">
<?php $this->widget('application.extensions.EReSyntaxHighlighter.EReSyntaxHighlighter', array('functionName'=>'regexHighlight'));?>


2 0
1 follower
Yii Version: 1.1
License: MIT
Category: User Interface
Developed by: balrok
Created on: Nov 1, 2010
Last updated: 10 years ago


show all

Related Extensions