[asterisk-users] Need help to strip variable

Yuan LIU
Thu, 29 Mar 2007 22:01:40 -0000

>From: "van Leen, Phil" <pvanleen@nontaurus.com>
>Date: Fri, 30 Mar 2007 11:52:34 +0800
>
>Hi all,
>
>I have a need to strip some characters from a variable to get the right
>data
>but have only found how to strip all but the last or middle stuff, need to
>keep the beginning.
>
>EG:
>With $(SIPURI) I want to keep just the sip number and delete the remainder
>'@server.com'.
>
>Ideally I'd like to use 'SayDigits($(sipuri[-@server.com])'

You can certainy use CUT(), or regular expression.

Yuan Liu

>All replies greatfully accepted.
>
>Phil