string pattern for ereg function
Posted: Tue Apr 20, 2004 1:42 am
any1 can tel me string pattern for ereg function which accept small and capital alphabets and a blank space
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<?php
ereg("^[a-zA-Z\s]+$",$str)
?>Code: Select all
ereg("^[a-zA-Z[]]+$",$str)Code: Select all
ereg("^[a-zA-Z ]+$",$str)
// space after the Z