Posted by Jim Michaels on 10/19/24 11:39
"Colin McKinnon"
<colin.thisisnotmysurname@ntlworld.deletemeunlessURaBot.com> wrote in
message news:74NAf.62520$Dg6.12645@newsfe3-gui.ntli.net...
> Fernando Rodredguez wrote:
>
>>
>> Hi,
>>
>> How can I know if a string only has alfanumeric chars?
>>
>> Thanks
>
> Use a regex.
>
> C.
give him an example!
preg_match('/^[\w\d]$/', $string);
[Back to original message]
|