Check for alpha characters
Posted: Wed Aug 16, 2006 11:52 am
feyd | Please use
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I only need to know if there are alpa characters in my string.
I have tried many combinations with regexperssions, preg_match, with no success. Anybody can do this?Code: Select all
if( !(preg_match("[:alpha"."]", "12345")))
echo ("are no characters<br>");
else
echo("charcters in string<br>");
?>Code: Select all
if( !(preg_match("[A-Z]", "12345")))
echo ("are no characters<br>");
else
echo("charcters in string<br>");
?>feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]