Reply to how to remove all non-letters

Your name:

Reply:


Posted by kevin bailey on 04/10/06 03:25

hi,

it's really late and i'm struggling with this one - so any help gratefully
received.

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
it hard.

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);
// print_r($matches);

$cleaned_word = matches[0];


thanks,

kev

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация