mpsn Posted February 25, 2012 Share Posted February 25, 2012 Hi, Does ",[a-zA-Z0-9]$" => a comma, followed by any alphanumeric as last character, so I don't really need '$' anchor, right? Link to comment https://forums.phpfreaks.com/topic/257774-preg-ques/ Share on other sites More sharing options...
AyKay47 Posted February 25, 2012 Share Posted February 25, 2012 well, without the string ending anchor. A string like ",hey whats up" would match. If you want the alphanumeric character preceded by the comma to be the only match, then yes you need the ending anchor. Link to comment https://forums.phpfreaks.com/topic/257774-preg-ques/#findComment-1321215 Share on other sites More sharing options...
mpsn Posted February 25, 2012 Author Share Posted February 25, 2012 I can't find the pattern characters for digits, letters, whitespace, non-whitespace on official php site, like I think d is for numbers, but how about the rest. Link to comment https://forums.phpfreaks.com/topic/257774-preg-ques/#findComment-1321229 Share on other sites More sharing options...
AyKay47 Posted February 25, 2012 Share Posted February 25, 2012 \d = digits [0-9] [a-zA-Z] = letters (case insensitive) [\s\t] = white space (matches a space and tab respectfully) [^\s\t] = non-white space (matches anything other than the above white space characters) what does this have to do with your original question? Link to comment https://forums.phpfreaks.com/topic/257774-preg-ques/#findComment-1321253 Share on other sites More sharing options...
mpsn Posted February 25, 2012 Author Share Posted February 25, 2012 my bad, I should have made new post. Thanks. Link to comment https://forums.phpfreaks.com/topic/257774-preg-ques/#findComment-1321265 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.