[Serusers] Simple question about notation

Antony Stone Antony.Stone at SER.Open.Source.IT
Fri Jan 28 15:04:36 CET 2005


On Friday 28 January 2005 15:01, Ricardo Martinez wrote:

> Hello list.
> 	Is there a way to simplify the notation of this configuration line?
>
> if ( (uri=~"^sip:111.*@.*") | (uri=~"^sip:222.*@.*") |
> (uri=~"^sip:333.*@.*") | (uri=~"^sip:444.*@.*") | (uri=~"^sip:00.*@.*")){
>
> with something like this maybe?
>
> if ( (uri=~"^sip:111 | 222 | 333 | 444 | 00.*@.*")) {

Try: if ( (uri=~"^sip:((1|2|3|4){3}|00).*@.*"))

Be sure to omit spaces where there shouldn't be literal spaces.

Antony.

-- 
There are two possible outcomes:

 If the result confirms the hypothesis, then you've made a measurement.
 If the result is contrary to the hypothesis, then you've made a discovery.

 - Enrico Fermi

                                                     Please reply to the list;
                                                           please don't CC me.




More information about the sr-users mailing list