atr_string_strip

Versions
6.1
atr_string_strip($string)

Undo a string of all insignificant characters.

Parameters

$string

Return value

String.

Code

atr/atr.module, line 513

<?php
function atr_string_strip($string) {
	// HTML tags cannot be considered words.
  $string = strip_tags($string);
  // Strip everything but words, whitespace and placeholder prefixes.
  $string = preg_replace('#[^@!%a-z\s]#i', '', $string);

  return $string;
}
?>