(RADIATOR) long regular expressions in <Handler>

Mariano Absatz radiator at lists.com.ar
Mon Oct 7 14:47:01 CDT 2002


Hi Hugh, Mike,

I have a bunch of <Handler>s that catch calls to different phone numbers 
(Called-Station-Id) through a regular expression that is quite large ('bout 
200 chars) of the form:
<Handler Called-Station-Id=/1111$|2222$|^1234567$|...lots more...|^5556736$/>
   AuthBy something
</Handler>

This works just fine, but it's a little hard to see and mantain...

I was wondering about a couple of things:

1) Can I use multiline Perl regular expressions with comments using "/x"?

2) Can I handle this somehow via an include?



1) could be something like:

<Handler Called-Station-Id=/1111$          # calling to provider 1
                           |2222$          # calling to provider 2
                           |^1234567$      # calling to provider sortie
                           |...lots more...
                           |^5556736$      # calling to 555-OPEN
                           />
   AuthBy something
</Handler>

Could this work? Do I have to put the "\" at the end of each line?



What about option 2)? It would be something similar but maybe written in a 
file and assigned like:

<Handler file:handler1.txt>
   AuthBy something
</Handler>

or maybe:

DefineFormattedGlobalVar handler1DNIS file:handler1.txt

<Handler Called-Station-Id=/{GlobalVar:handler1DNIS}/>
   AuthBy something
</Handler>


or this is totally nuts :-(

TIA.

--
Mariano Absatz
El Baby
----------------------------------------------------------
Beware of programmers with screwdrivers.


===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list