Msg#: 3213949 posted 11:28 pm on Jan 9, 2007 (gmt 0)
there are 11 characters with special meanings: the opening square bracket [, the backslash \, the caret ^, the dollar sign $, the period or dot ., the vertical bar or pipe symbol ¦, the question mark?, the asterisk or star *, the plus sign +, the opening round bracket ( and the closing round bracket ). These special characters are often called "metacharacters".
If you want to use any of these characters as a literal in a regex, you need to escape them with a backslash.
This comes from a well known domain dedicated to "regular-Epressions" hmmmm see what I mean :)
Msg#: 3213949 posted 11:33 pm on Jan 9, 2007 (gmt 0)
You don't escape anything within the string itself. It is in your pattern syntax that you escape meta characters. Since you left out the pattern we cannot tell for sure, but it is definitely coming from your pattern. :)
Msg#: 3213949 posted 5:53 am on Jan 10, 2007 (gmt 0)
the error is generated from your pattern however the code you have posted doesn't have any problem so not sure why isn't it working... also if you just want to replace combination of udnerscores then you can use str_replace("___",'',$string);