[Freeswitch-users] Bracketing or not bracketing

Dušan Dragić dragic.dusan at gmail.com
Sat Jan 11 15:04:44 MSK 2014


As Steve and Steven already said, you only need the brackets to create
a capture group that contains the regexp match.

Take a look at the regular expression wiki page:
https://wiki.freeswitch.org/wiki/Regular_Expression

On 11 January 2014 12:53, Steven Ayre <steveayre at gmail.com> wrote:
> These will match identically.
>
> The only difference will be the second will set $1 to 123456789, the first
> will not.
>
> Brackets are only needed if you either want to capture part of the match
> into $1 etc, or you want to match against multiple possibilities
> (this|orthis).
>
>
> On 11 January 2014 08:03, Richard Mace <richard.mace at gmail.com> wrote:
>>
>> Hi,
>> When you are setting up an inbound route, should you put brackets round
>> the  destination_number or not?
>>
>> That is, which of theses entries is correct/safer/will work?
>>
>>     <condition field="destination_number" expression="^123456789$>
>>
>> or
>>
>>      <condition field="destination_number" expression="^(123456789)$>
>>
>>
>> Thanks in advance
>>
>> Richard
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> 
>> 
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://wiki.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>



-- 
Dušan Dragić



Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list