Expect (the language) "couldn't compile regular expression pattern: quantifier operand invalid" error -
I'm having trouble with a relatively regular expression.
I am trying to match it Output:
RUC. Hg 0: 6 +6 ITPOCHG 0: 6 +6 ITUC HG 0: 6 +6 ITPKTHG 0: 6 +6 IT 127 Hg 0: 6 +6 ITBIT Hg 0: 456 +456 IR 127 Hg 0: 6 +6 IRPKTHG 0: 6 +6 IRUCHH 0: 6 +6 IRPOK Hg 0: 6 +6 IRBYT HG 0: 456 +45 IRGenk 00: 1 +1
I want to exclude '6' from '6' in line:
ITPKT.hg0: 6 +6 < / Code>
I am using this regular expression:
ITPKT * \ + (\ [0-9])
But when I run the script, I get an error:
Regular expression patterns are not compiled Could: While executing the Quantifier, while "Expected -Ray" while executing ITPKT. * \ + (\ [0- 9]) "{puts" $ expect_out (1, string) "; set STT $ expect_out (1, string); set 1 sent;}"
< / Pre>I have read that some characters need to run away or try to evaluate the expectation (hence '[top' escaping]], and I have an 'invalid command' error, so I think That I have got past from this stage.
But now I am stuck in why this expression will not be compiled: -
Any expected regex tool Do you know who can help me debug this?
To avoid!
The correct expression is:
expected - "ITPKT. * \ + ([[0-9])" {...} < / Code>
Comments
Post a Comment