[HELP] Dialplan Regular Expression Operator

When an internal SIP call comes into our inside context, I’m trying to grab the {SIPURI} channel variable and then modify it with a regular expression operator. I’m trying to pull out the string of characters after the ‘:’ in sip and up to the ‘@’ before the domain or IP is given for an example like this:

sip:userblah@192.168.1.55:5060

The regular expression I created works when I test independently… however it fails when a call is received and asterisk tries to parse it in the dialplan.

Does Asterisk support lookarounds in regular expressions and if so, how do you do escape it properly so asterisk doesn’t complain.

Here’s a snip of our dialplan:

...
exten => 7575,n,Set(rx="((?sip)(?<=[:])(.*)(?=@))")
exten => 7575,n,Set(PEER=$["${SIPURI}" : ${rx}])
...

The error:

[Jan 12 13:36:37] WARNING[3294]: ast_expr2.fl:398 ast_yyerror: ast_yyerror():  syntax error: syntax error, unexpected '('; Input:
"sip:userblah@192.168.1.55:5060" : ((sip)([:])(.*)(=@))
                                         ^

Thanks in advance for any help!

For now, I just used the following simple regular expression to get it working without lookaround:

sip:(.*)@

However, I’m still curious as to what subset of RE support Asterisk has.