On Thu, 19 May 2005, Matthew Boehm wrote: > Hugh L. Johnson wrote: > > Does ^ work as a NOT in an expression for extensions? > > Are the following equivalent? > > > > exten => _58[^389],1,dial(${${EXTEN}},${RINGLONG},tr) > > > > exten => _58[0124567],1,dial(${${EXTEN}},${RINGLONG},tr) > > Not sure which RegEx book you read but ^ (caret) stands for "line beginning" > not "don't match".
Not inside a square bracket it doesn't. There a caret normally means "invert the set" if it is in the first position. See e.g. "man grep" or just about any other text describing standard regexps. >From reading pbx.c (EXTENSION_MATCH_CORE) it seems that asterisk does not implement the inverted set inside []. That is ok, I guess, since the regexps in Asterisk are among the most nonstandard ones anyone has ever seen. :-) Peter _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users