Skip to content

Instantly share code, notes, and snippets.

@jeremysexton
Created May 16, 2014 04:45
Show Gist options
  • Save jeremysexton/b5f09d77e4c72bd1f791 to your computer and use it in GitHub Desktop.
Save jeremysexton/b5f09d77e4c72bd1f791 to your computer and use it in GitHub Desktop.
Quick and dirty modifier to strip punctuation.
<?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