regex tutorial: http://www.regular-expressions.info/tutorial.html As for the markup syntax: Take a look in the scripts/stdmarkup.php for ideas how the markup can be used.