Strip/Remove IRC client control characters

Here’s a small PHP function that gets rid of the mIRC (or any other IRC client) control characters, that is the colors, underlines, italics, etc.

function stripControlCharacters($text) {
	$controlCodes = array(
		'/(\x03(?:\d{1,2}(?:,\d{1,2})?)?)/',	// Color code
		'/\x02/',								// Bold
		'/\x0F/',								// Escaped
		'/\x16/',								// Italic
		'/\x1F/'								// Underline
	);
	return preg_replace($controlCodes,'',$text);
}

Free QDB System

Are you an IRC dweller? Got your own channel? Are you looking for an easy way to collect quotes of you and your friends mucking around? You also want to let your friends rate them, comment and share on social networks? Well, you can stop looking, all you need is an iBash account from. Once you create one, you can setup as many quotes collections as you want. Check out the cool design of a collection and it’s URL: http://www.iBash.org/Bash