Summary:ASTERISK-07615: Operators ! and =~ do not work in 1.2, contrary to what README.variables says
Reporter:Michael Neuhauser (mneuhauser)Labels:
Date Opened:2006-08-28 14:42:57Date Closed:2006-08-28 15:59:08
Versions:Frequency of
Description:The file doc/README.variables states that there are ! and =~ operators (logical complement and unanchored regular expression match) while the lexical scanner (i.e., ast_expr2.fl and ast_expr2f.c) does not contain any code to detect these tokens (and so the operators do not work). The parser (i.e., ast_expr2.y and ast_expr2.c) however seems to have support for these tokens.

Either the scanner should be updated or the documention should be corrected.
Comments:By: Steve Murphy (murf) 2006-08-28 15:23:30

Yes, something got mixed up long, long ago. Somehow, those functions got pruned in 1.2, as they were considered new functionality. But they were still in the docs.
So, in keeping with tradition, I'll erase the mention in the docs. 1.4 will have them, and trunk has them now.

By: Steve Murphy (murf) 2006-08-28 15:26:17

But, I do have to be careful, and I think this happened before. 1.2 automatically updates trunk, and the danger is that, if I remove those paragraphs from the docs in 1.2, then the automerge stuff will automatically remove it also from the trunk! Ouch! So, wish me luck. I have to make sure the rev ends up in the blocked list.

By: Michael Neuhauser (mneuhauser) 2006-08-28 15:43:46

Sorry to generate extra work, but this nearly drove me crazy as there is no error message for expressions like "${foo}" =~ "bar". Even worse, it sometimes seemed to work as the expression is interpreted as "${foo}" = "bar" and if by chance foo contains exactly "bar" ... So I think a corrected documention would be really helpful. Thank you.

By: Steve Murphy (murf) 2006-08-28 15:58:05

OK, I committed changes to 1.2; and set a block in trunk for 41240.

By: Steve Murphy (murf) 2006-08-28 15:59:07

Looks like I can close this now.