Jump to content

[SOLVED] preg_match('/^\w+$/',$string);


jonniejoejonson

Recommended Posts

It searchs [A-Za-z] \w is word characters. \d is digits. \s is whitespace

 

\w matches: a-z A-Z 0-9 _

 

Basically all it does is match a string that consists of *only* those characters I just listed above, and is 1 or more character in length.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.