Unlang, regex problem
Hello, there seems to be a problem with Unlang, !~ does not work as expected. if ("%{User-Name}" =~ /foobar/) { } works: Mon Jul 30 14:14:14 2007 : Debug: >>> CALLING EVALUATE "%{User-Name}" =~ /foobar/) Mon Jul 30 14:14:14 2007 : Debug: >>> LOOKING AT "%{User-Name}" =~ /foobar/) Mon Jul 30 14:14:14 2007 : Debug: >>> 24:%{User-Name} 17 23:foobar Mon Jul 30 14:14:14 2007 : Debug: >>> EVALUATE 0 ::):: Mon Jul 30 14:14:14 2007 : Debug: >>> AT EOL2a Mon Jul 30 14:14:14 2007 : Debug: >>> EVALUATE RETURNED ::):: Mon Jul 30 14:14:14 2007 : Debug: >>> AT EOL but: if ("%{User-Name}" !~ /foobar/) { } does not work: Mon Jul 30 14:15:07 2007 : Debug: >>> CALLING EVALUATE "%{User-Name}" ! ~ /foobar/) Mon Jul 30 14:15:07 2007 : Debug: >>> LOOKING AT "%{User-Name}" ! ~ /foobar/) Mon Jul 30 14:15:07 2007 : Debug: >>> I0 24:%{User-Name} Mon Jul 30 14:15:07 2007 : Debug: >>> EVALUATE 0 ::!~ /foobar/):: Mon Jul 30 14:15:07 2007 : Debug: >>> AT EOL2a Mon Jul 30 14:15:07 2007 : Debug: >>> EVALUATE RETURNED ::!~ /foobar/):: Mon Jul 30 14:15:07 2007 : Error: Unexpected trailing text at: ! ~ /foobar/) You can work around this with: if (!"%{User-Name}" =~ /foobar/) { } But i guess the other way should work too. Regards Stephan Jaeger -- Stephan Jäger <stephan.jaeger@ewetel.de>
Stephan Jäger wrote:
Hello,
there seems to be a problem with Unlang, !~ does not work as expected. ... if ("%{User-Name}" !~ /foobar/) { ... Mon Jul 30 14:15:07 2007 : Error: Unexpected trailing text at: !
Try doing a "cvs update". It should be fixed now. Did I mention that the parser is pretty crappy? Alan DeKok.
Am Dienstag, den 31.07.2007, 09:31 -0400 schrieb Alan DeKok:
there seems to be a problem with Unlang, !~ does not work as expected.
...
if ("%{User-Name}" !~ /foobar/) { ... Mon Jul 30 14:15:07 2007 : Error: Unexpected trailing text at: !
Try doing a "cvs update". It should be fixed now.
Hmm, that does not seem to work, i get the same error as before.
Did I mention that the parser is pretty crappy?
;) Stephan Jaeger -- Stephan Jaeger <stephan.jaeger@ewetel.de> EWE TEL GmbH
Stephan Jaeger wrote:
if ("%{User-Name}" !~ /foobar/) { ... Mon Jul 30 14:15:07 2007 : Error: Unexpected trailing text at: ! Try doing a "cvs update". It should be fixed now.
Hmm, that does not seem to work, i get the same error as before.
I cut & paste that exact line, and it works for me. Alan DeKok.
Hi,
Stephan Jaeger wrote:
if ("%{User-Name}" !~ /foobar/) { ... Mon Jul 30 14:15:07 2007 : Error: Unexpected trailing text at: ! Try doing a "cvs update". It should be fixed now.
Hmm, that does not seem to work, i get the same error as before.
I cut & paste that exact line, and it works for me.
suspect 'make distclean' and 'rm /wherever/libs/are/*rlm*' sort of things werent performed at his end after the cvs update (?) alan
Am Dienstag, den 31.07.2007, 10:48 -0400 schrieb Alan DeKok:
if ("%{User-Name}" !~ /foobar/) { ... Mon Jul 30 14:15:07 2007 : Error: Unexpected trailing text at: ! Try doing a "cvs update". It should be fixed now.
Hmm, that does not seem to work, i get the same error as before.
I cut & paste that exact line, and it works for me.
Yes, it does. Sorry my fault. Stephan Jaeger -- Stephan Jaeger <stephan.jaeger@ewetel.de> EWE TEL GmbH
participants (4)
-
A.L.M.Buxey@lboro.ac.uk -
Alan DeKok -
Stephan Jaeger -
Stephan Jäger