[Mono-list] ProcessStartInfo and arguments with a backslash

Yves Goergen nospam.list at unclassified.de
Sat Oct 1 14:56:36 EDT 2011


On 01.10.2011 20:49 CE(S)T, Robert Jordan wrote:
> On 01.10.2011 20:17, Yves Goergen wrote:
>> 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|$)";

My fault. I'm doing that. The string with the \s in it is read from a
configuration file and I mistyped it here in my example. If I had typed
it in Visual Studio, I'd have noticed it. See how I'm depending on live
compiler errors... ;-)

-- 
Yves Goergen "LonelyPixel" <nospam.list at unclassified.de>
Visit my web laboratory at http://beta.unclassified.de


More information about the Mono-list mailing list