Hello Firends.., every day i thought that i have know some thing about preg_split(), but when ever i am trying to applying, i am facing some doubts and problems.. please.., help me! where i can learn about preg_split(), i mean dont give http://php.net/, i already visited not understand clearly..., i mean my intension is to understand.. example: preg_split("/[\s]+/", $stri PHP: using / / for starting and ending., and what about that /s and [/s] and some other symblos tooooo., Please explain or share any site if you know, which gives the clear explanation for it.. even in famous sites also i checked but they are not clear..! I would be most great ful for your time and help..! Thanks Jaswanth
Im not sure why you arent looking at http://www.php.net; it has /everything/ you need on there. If more people paid attention to it, there wouldn't be so many myths flying around The slashes are used as delimeters; /(content)/ is showing the start and end of the expression (content). You dont have to use slashes, you can use anything you like (there are rules to it, see the link below) as long as they match. With regards to the rest, it is a regular expression; you might want to read up on that as it isnt independant to the split function; *EVERYTHING* you need to know to answer your query is here including delimeters, and all other characters, you shouldnt be so quick to discard the OFFICIAL website. http://www.php.net/manual/en/reference.pcre.pattern.syntax.php http://uk.php.net/manual/en/regexp.reference.meta.php There are plenty of other places around; google if you need more. http://www.regextester.com/pregsyntax.html
ya i read in php.net.., but friend.. there i not found clear explanation like why /s /w... like those.. that why.. am asking hear..! Any way thanks yar.
from one of the links I included above, there is a link for "backslashes" http://www.php.net/manual/en/regexp.reference.backslash.php Here you can find your answer: It's all there
probably, like lukeg32 said, you dont need reference on preg_split, or preg_match or any of the PCRE functions you need reference on PCRE syntax itself... its a bible out there at php.net refer http://www.php.net/manual/en/pcre.pattern.php and i would suggest you start reading with syntax http://www.php.net/manual/en/reference.pcre.pattern.syntax.php