Posted by Marcin Dobrucki on 03/09/06 12:46
Paul Morrison wrote:
> I have looked at the PHP string functions and I cant see any function to
> check to see whether a string starts with a certain letter or letters. Is
> there any way of doing this with the built in functions?
preg_match("/^[a-z]/",$string); // strings starting with a,b,c...,z
or whatever you want the string to start with.
/Marcin
[Back to original message]
|