the solution is that backslashes in regular expressions should be escaped itself by a backslash, since the erlang string handling consumes one backslash and inserts the resulting char into the string. So in a string \x00 is replaced by ascii zero and \\x00 results in \x00 Michael