Created
May 16, 2014 04:45
-
-
Save jeremysexton/b5f09d77e4c72bd1f791 to your computer and use it in GitHub Desktop.
Quick and dirty modifier to strip punctuation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Modifier_punctless extends Modifier { | |
public function index($value, $parameters=array()) { | |
$value = preg_replace("/[^a-zA-Z0-9\s]/", "", $value); | |
return $value; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment