Regx Question
Hi All I have the following in the users and acct_users files DEFAULT Called-Station-Id == 0198334115, Proxy-To-Realm := .com I would like to match on 198334115 with a possibility of about 4 to 6 more number on the front of this number. I have tried a number of difference regx's but non of them have worked so I must have something wrong :) Any ideas would be great. Thanks Mike - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: Regx Question
Mike O'Connor [EMAIL PROTECTED] wrote: I have tried a number of difference regx's but non of them have worked so I must have something wrong :) The O'Reilly book helps a lot. Reading the man page for the users file would help, too. You're not doing regular expression matching at all. DEFAULT Called-Station-Id =~ 198334115$, Proxy-To-Realm := .com Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: Regx Question
Thanks Alan Reading the man page for the users file would help, too. You're not doing regular expression matching at all. DEFAULT Called-Station-Id =~ 198334115$, Proxy-To-Realm := .com I did not give any examples of what I had tried which I suppose I should have. Below are some of my attempts #DEFAULTCalled-Station-Id == 198407112$, Proxy-To-Realm := .au #DEFAULTCalled-Station-Id == *128407112$, Proxy-To-Realm := .au #DEFAULTCalled-Station-Id == ^[0-9]*128407112$, Proxy-To-Realm := .au None of the above worked, even though the exact number did. Cheers Mike - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
RE: Regx Question
Yes, but you missed one important little detail... use =~ not == and as Alan suggested, read the man page where you'll find all sorts of usefull information like: Attribute =~ Expression As a check item, it matches if the request contains an attribute which matches the given regular expression. This operator may only be applied to string attributes. Not allowed as a reply item. :) cheers, Mike Thanks Alan Reading the man page for the users file would help, too. You're not doing regular expression matching at all. DEFAULT Called-Station-Id =~ 198334115$, Proxy-To-Realm := .com - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: Regx Question
Mike Mitchell wrote: Yes, but you missed one important little detail... use =~ not == Hi Mike, Alan Did read the manual just did not see that one :( I'll go check that out now Cheers Mike - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html