I had a problem with string which have some \ chars at the end of the
string. For example:
$String = "I want this **** out of here\\\\\\\\\";
I needed to remove it useing regular expression...i thinked that
something like "/\\+$/" is enough but i was wrong. I made some tries
and finaly i removed "\" chars it with "/\\\+$/". It works (i'm proud
with myself :)), but i can't understand why \\\ matchs single \, and \\
not...
string. For example:
$String = "I want this **** out of here\\\\\\\\\";
I needed to remove it useing regular expression...i thinked that
something like "/\\+$/" is enough but i was wrong. I made some tries
and finaly i removed "\" chars it with "/\\\+$/". It works (i'm proud
with myself :)), but i can't understand why \\\ matchs single \, and \\
not...
Comment