[asterisk-dev] Better pattern matching

Kristian Kielhofner kristian.kielhofner at gmail.com
Fri Aug 3 12:48:08 CDT 2007


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



More information about the asterisk-dev mailing list