You have to use backslash to escape in every regular expression you use, doesn't matter is IP, hostname, username ... Have you seen otherwise is documentation? If so, it is an error and must be corrected.
Daniel
On 5/17/2004 12:37 PM, Amen Holmes wrote:
Thanks - that makes sense. If I am using a url instead of defining the ip address, e.g. iptel.org, why don't I need to put in the backslash to escape the . character?
*/Jan Janak jan@iptel.org/* wrote:
On 14-05 07:47, Amen Holmes wrote: > I am a newbie to ser and am trying to get ser.cfg working for a specific ip address. > > I am trying to get ser.cfg to pick up a specific ip address. Do I need anything special when defining the ip address (like \ characters)? > > Any help would be greatly appreciated. > > e.g. > route{ > > if (uri=~"^sip:[09][0-9]*@194.xxx.xxx.xxx") { > ........} Yes, =~ means "match using regular expression" and the string between quotes is supposed to be a regular expressions. Therefore you have to escape . characters with backslash: if (uri=~"^sip:[09][0-9]*@194\.xxx\.xxx\.xxx") { Jan.
Do you Yahoo!? SBC Yahoo! http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=24311/*http://promo.yahoo.com/sbc/
- Internet access at a great low price.
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers