Consider this:
$sServerPath = "\\\\nlyehvedw1cl016\\projects$\\ARCLE_SW_SVN\\";
$sSVNParentPath = $sServerPath."svn\\";
$bla = "
authz_module_name = TEST_TestRepos
repository_dir = bla
W";
$sSVNParentPath = $sServerPath."svn\\";
$sReplaceBy = "repository_dir = ".$sSVNParentPath.$sProjectName."\n";
echo $sReplaceBy;
echo preg_replace ('/repository_dir = ([a-zA-Z0-9\/].*?)\n/i', $sReplaceBy, $bla);
The result is:
repository_dir = \\nlyehvedw1cl016\projects$\ARCLE_SW_SVN\svn\
authz_module_name = TEST_TestRepos
repository_dir = \nlyehvedw1cl016\projects$\ARCLE_SW_SVN\svn\
W
The echo of $sReplaceBy shows the resulting string as I expect it, including the first 2 back-slashes. However, after the preg_replace, the echo of the result shows only one back-slash!
Anybody know what's causing this?