Hi, Negating is done with [^...] in a regex, so 'not 1' is matched with:
/^[^1]$/ If you want to match on a longer sequence, you can do that with negative lookahead, for example 'not 123' can be matched like this: /^(?!123$)\d{3}$/ regards, Leon On Oct 21, 2009, at 1:34 PM, Mark Campbell-Smith wrote: > Hi! > > How do I do a NOT equal to in a dialplan expression > > Normaly in regex I would use the ! character. This doesn't seem to > work in FS.. > > ie > <condition field="${variable}" expression="!^1"> > > Shouldn't that match when the variable is not starting with one? > > _______________________________________________ > FreeSWITCH-users mailing list > FreeSWITCH-users@lists.freeswitch.org > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users > http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org