Hi Barry,

Obviously, you could also use:

RewriteFunction sub { my ($a) = shift; $a =~ tr/A-Z/a-z/; $a =~
s/^([^@]+).*/$1/; $a; }

Cheers,

-Andy

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]] On Behalf Of Barry Andersson
> Sent: donderdag 18 april 2002 3:45
> To: [EMAIL PROTECTED]
> Subject: (RADIATOR) Rewriteusername Regular Expression Newbie
> 
> 
> Hi,
> 
> I'm afraid Perl regular expressions are a bit foreign to me.
> 
> I want to force all usernames to lower case and strip any 
> domain suffix that
> may be attached. Do I simply add two RewriteUsername lines at the very
> beginning of my Radius.cfg before any AuthBy or Realm clauses such as:
> 
> RewriteUsername s/^([^@]+).*/$1/
> RewriteUsername tr/A-Z/a-z/
> 
> or can I combine the two into a single line? Note that we have five
> different realms that usres may inadvertently include.
> 
> Cheers
> 
> Barry Andersson
> 
> 
> ===
> Archive at http://www.open.com.au/archives/radiator/
> Announcements on [EMAIL PROTECTED]
> To unsubscribe, email '[EMAIL PROTECTED]' with
> 'unsubscribe radiator' in the body of the message.
> 

===
Archive at http://www.open.com.au/archives/radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to