Ahmad
2009-07-30 11:34:09 UTC
Hi,
I was trying pieces of regular expressions testing on tclsh, when I
came to this behaviour; I did the following sequence:
% set a {aaaAAAaaa}
aaaAAAaaa
% regexp (?i)AAA(?-i:AAA)AAA $a
couldn't compile regular expression pattern: quantifier operand
invalid
Tried it also between braces delimits:
% regexp {(?i)AAA(?-i:AAA)AAA} $a
couldn't compile regular expression pattern: quantifier operand
invalid
I'm using TCL 8.5 under Linux OS.
% puts $tcl_version
8.5
Why this error happens?
I was trying to do case insensitive matching for a pattern, followed
by a case sensitive matching (within the look ahead scope), finally
ended by a case insensitive matching. Did i make anything wrong?
Please help.
Thanks,
Ahmad
I was trying pieces of regular expressions testing on tclsh, when I
came to this behaviour; I did the following sequence:
% set a {aaaAAAaaa}
aaaAAAaaa
% regexp (?i)AAA(?-i:AAA)AAA $a
couldn't compile regular expression pattern: quantifier operand
invalid
Tried it also between braces delimits:
% regexp {(?i)AAA(?-i:AAA)AAA} $a
couldn't compile regular expression pattern: quantifier operand
invalid
I'm using TCL 8.5 under Linux OS.
% puts $tcl_version
8.5
Why this error happens?
I was trying to do case insensitive matching for a pattern, followed
by a case sensitive matching (within the look ahead scope), finally
ended by a case insensitive matching. Did i make anything wrong?
Please help.
Thanks,
Ahmad