Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- how to remove all non-letters
- kevin bailey
April 10, 2006, 12:25 am
rate this thread
it's really late and i'm struggling with this one - so any help gratefully
if i have a string how would i strip out all characters except letters
between a-z and A-Z
i presume this would be using preg_grep but not being a regex guru is making
would it be something like?
$subject = "abc-d%ef"; // Want i want to get back is 'abcdef'
$pattern = '/[a-zA-Z]*/';
preg_match($pattern, $subject, $matches);
$cleaned_word = matches;