Forum Moderators: coopster
Sometimes i encountered a "dot" between a string,
like : $a = $b.$c
sometimes i see a strange symbol like \n , \_blank.
While \n is very common and i can figure it what it mean, but I face the problem of finding out the meanings of all these symbols. I've searched the word like ".", "\_blank" in the PHP Manual but nothing shows up.
Could you give me some key words for searching?
Thanks a lot!
It is quite common for people to escape everything that isnt a letter or number. As it is easy to leave a character in a character class that has special meaning and then end up wandering why the regex isnt working. Although it isnt necessary to escape everything if you are not sure then \ anything that isnt alphanumeric.
Although of course the down side of that is \\n will be a literal \ followed by n...so in the long run it is better to know what each of the special characters are. However in the short term, or if you find a regex that isnt behaving as it should, then backslash everything. The most common one to miss is - in the middle of a character class, as that can give some very strange results if you are not looking for a range of character.