|
Palomar Apprentice
Joined: 11 Oct 2000 Posts: 138 Location: Portugal
|
Posted: 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 |
|
|
|
Charbal GURU
Joined: 15 Jun 2001 Posts: 654 Location: USA
|
Posted: 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 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Jan 22, 2002 5:57 am |
Test it and find out.
LightBulb
All scripts untested unless otherwise noted |
|
|
|
Palomar Apprentice
Joined: 11 Oct 2000 Posts: 138 Location: Portugal
|
Posted: 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 |
|
|
|
Troubadour GURU
Joined: 14 Oct 2000 Posts: 556 Location: USA
|
Posted: 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 |
|
|
|
|
|