Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Palomar
Apprentice


Joined: 11 Oct 2000
Posts: 138
Location: Portugal

PostPosted: Mon Jan 21, 2002 5:54 pm   

Matching pairs of quotes.
 
How does zMud matches pairs of quotes? e.g. consider the string

"a first string " separated " a second string"

How does zMud matches the pairs of quotes?

1. The strings "a first string" and " a second string" within the bigger one - this is, for a ", zMud looks for the first matching " to the right.

2 The string " separated " within the bigger one - for the first " zMud looks for the matching " by starting at the end of the string and then looking to the left.

Thanx for the help,
Palomar
Reply with quote
Charbal
GURU


Joined: 15 Jun 2001
Posts: 654
Location: USA

PostPosted: Mon Jan 21, 2002 6:22 pm   
 
If you passed this to a command, it would perceive three arguments: "a first string ", "separated" and " a second string"



 - Charbal
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Jan 22, 2002 5:57 am   
 
Test it and find out.

LightBulb
All scripts untested unless otherwise noted
Reply with quote
Palomar
Apprentice


Joined: 11 Oct 2000
Posts: 138
Location: Portugal

PostPosted: Tue Jan 22, 2002 3:54 pm   
 
OK, fair enough. Then let me rewrite that post of mine:

*paste the entire post here*

BTW, can you devise some way to test this on zMud?

Thanx,
Palomar
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Tue Jan 22, 2002 10:36 pm   
 
And the answer is: it depends.

It depends on what command you're using it with. It depends on how you write the pattern if you're trying to capture something with quotes in it. It depends on whether the command strips out quotes or whether it treats the quotes literally.

So, what exactly are you trying to do with these nested quotes?

BtW, recently I've found it useful to use single quotes inside double quotes when I need to nest quotes.

"a first string ' separated ' a second string"

Troubadour
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net