Greg Brown wrote:
You would think so, but apparently not. I found this example on page 482 of
the 1996 edition of exploring Expect:
if [regexp "(\[^:]*:.*\[-, ] (\[0-9]+" $buf dummy ng seen]
Logically you would think that you would have to escape the "]" but you
don't seem to have it as strage as that seems.
because once you've escaped the [, it's no longer a matched pair of
capturing braces
You probably should still escape it for "correctness" but it's not
necessary. Since there's no "I'm inside a []" flag set, it's assumed
that it's just a normal ].
--
TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ : http://trilug.org/faq/
TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
TriLUG PGP Keyring : http://trilug.org/~chrish/trilug.asc