I want ask about preg_match how i can understand
/\s*;\s*/
In code
preg_split('/\s*;\s*/', $something);
I want know how i can replace preg_split I do not know, because I do not know meaning of the expression as a function of
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Tha regex pattern
/\s*;\s*/The first and the last
/are delimiters. And should always encapsulate the regex pattern (at least forpregfunctions).You could also use another character for this, but
/is often used.Could have also written it like:
#\s*;\s*#The
\sin the pattern matches white-space characters (space, tabs, linebreaks).The
*means repeats the previous item zero or more times.The
;is just the character;.Also see the info @ http://www.regular-expressions.info/reference.html for a cheatsheet