[bf1942] Linux server status update 2003-04-28

Scratch Monkey ScratchMonkey at SewingWitch.com
Tue Apr 29 05:00:07 EDT 2003


--On Tuesday, April 29, 2003 10:28 AM +0200 "--=*dD*|Campino=--"
<campino at divine-devils.de> wrote:

> What about single quotes?
> 
> admin.execRemoteCommand "object.method 'this has space'"

That's good only to one level of nesting. Backslash escaping should work to
arbitrary depth, since each level can strip out a layer of backslashes.

It may be the case that the present set of commands never has need for more
than one level of nesting, but if it's designed for deep nesting now, then
that code never has to be touched again when that feature is needed in the
future.

Another approach is to use matched delimiters, like parens, brackets, or
braces, and then escape those when used within a string. Perl takes this
approach when specifying regular expressions.



More information about the Bf1942 mailing list