Well, I'll assume you want to replace all backslashes in a string with bars... Well, because this is a simple string replace, I don't recommend using regular expressions. I suggest using str_replace().
So...
$mystring = "This is \a\ string \that\ has \backslashes\ in it!";
$mystring = str_replace("\","|",$mystring);
Or, if you absolutely must use regular expressions:
$mystring = preg_replace("~\\~","|",$mystring);
or
$mystring = ereg_replace("\\","|",$mystring);
Hope this helps!
-Josh B