- preg_match_all: 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] ) ) );