@temp_user123Jul 05.2007 — #It is used for two purposes -- to represent a special character sequence, or to suppress the meaning of a character sequence. For example... The following regular expression would match on the letter "t":
/t/
while the following regular expression would match on the tab character:
/t/
The following regular expression would match on any character:
/./
while the following regular expression would match only on the period character:
@temp_user123Jul 07.2007 — #A regular expression is delimited by forward leaning slashes. So, this:
/./
Means to match on any character (except newline). That is the special significance of the period character in Regular Expressions. To prevent that special significance, and use the period character to match only on an actual period character, then the period character must be "escaped" as follows:
/./
The "escape" character is always the backward leaning slash.
@JavajoobauthorJul 07.2007 — #I think it is the escape character in mind I'm just slightly unsure of what it is. I am aware that the . represents any single character
@temp_user123Jul 07.2007 — #I think it is the escape character in mind I'm just slightly unsure of what it is.[/QUOTE] I'm not sure what you mean by that -- since I've just explained it very well. Otherwise, yes, you can even escape the escape character. The following will match on the backward leaning slash character -- if that is what you desire:
//
Note, however, that is some cases you have to double-escape it:
//
This usually occurs because, internally, PHP is passing the string to another module and, thus, the escape process has to occur once again.