I need to remove a substring of a string, but only when it is at the END of the string.
for example, removing \'string\' at the end of the following strings :
preg_replace and this pattern : /string\z/i
\z means end of the string
http://tr.php.net/preg_replace