[asterisk-dev] Better pattern matching

John Todd jtodd at loligo.com
Fri Aug 3 16:14:17 CDT 2007


At 1:48 PM -0400 2007/8/3, Kristian Kielhofner wrote:
>On 8/3/07, John Todd <jtodd at loligo.com> wrote:
>..snip..
>>  ; this is a normal context
>>  ;
>>  [blah]
>>  exten => _X.,1,NoOp(The dialstring is ${EXTEN})
>  >
>>
>  > ; this is an extended regexp context, as noted by
>>  ;  the "*_" prefix in the context name, and this
>>  ;  context will run a lot slower than [blah] does
>>  ;
>>  [*_blah-plusplus]
>>  exten => ^*NANCY*,1,NoOp(The dialstring contains the string "NANCY")
>>
>>
>>
>>  JT
>>
>
>JT,
>
>   I like this except...  Why not just use regex- as a prefix (like macro-)?
>
>[regex-blah-plusplus]
>exten => ^*NANCY*,1,NoOp(The dialstring contains the string "NANCY")
>
>   Seems less confusing and easier to search for (speaking of grep).
>
>--
>Kristian Kielhofner


Sure, that's fine - I'm not overly concerned about the actual "magic 
cookie" format, so "regex-" works just as well for me.

JT




More information about the asterisk-dev mailing list