On 01.10.2011 20:17, Yves Goergen wrote:
> Hi,
>
> I am debugging a problem with my .NET application calling a UNIX
> programme with arguments. The bash command line looks like this:
>
>     /usr/bin/smem -P '/usr/sbin/exim4(\s|$)'
>
> My C# code to do exactly that is the following:
>
>     string processPath = "/usr/sbin/exim4(\s|$)";

No, it isn't ;) '\s' is not a known escape (it won't even compile).

You need to escape the '\' with a '\':

string processPath = "/usr/sbin/exim4(\\s|$)";

Robert

_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to