- preg_match_all: documentation ( source)
- explode: documentation ( source)
- trim: documentation ( source)
- strtolower: documentation ( source)
- ucfirst: documentation ( source)
<?php
preg_match_all( '/\[([\w]*?)\:([\w\W\s]*?)\]/' , '[email:optin|<u>Optin</u>]' , $matches);
echo $class = "Frontburner_Tag_" . ucfirst( trim( strtolower( $matches[1][0] ) ) ) . "\n";
$values = explode( "|" , $matches[2][0] );
$tag = $values[0];
echo $tag . "\n";
echo "return" . ucfirst( trim( strtolower( $this->tag ) ) );