Need a little regex help

Sallee, Stephen (Jake) Jake.Sallee at umhb.edu
Mon Sep 19 15:21:02 CEST 2011


I found a nifty little tool a while back that has really helped me with difficult regex's it's called RegexDesigner and runs fine on 64bit Win 7.  There is a simple GUI that shows you the regex, and helps you build it, then you can give it some input and it will how you the outcome ... handy little tool.

Jake Sallee
Godfather of Bandwidth
System Engineer
University of Mary Hardin-Baylor
900 College St.
Belton, Texas
76513
Fone: 254-295-4658
Phax: 254-295-4221


-----Original Message-----
From: freeradius-users-bounces+jake.sallee=umhb.edu at lists.freeradius.org [mailto:freeradius-users-bounces+jake.sallee=umhb.edu at lists.freeradius.org] On Behalf Of Commonn Systems
Sent: Friday, September 16, 2011 8:51 PM
To: FreeRadius users mailing list
Subject: Re: Need a little regex help

I guess all the regex gurus will laugh at my request .... I figured it out, for others, looks like this works: .*:SSID_ABC !


On 9/16/2011 6:22 PM, Commonn Systems wrote:
> Hello list!
>
> After reading the list pretty much everyday for a month now, going 
> through the docs, manuals and a lot of googling (which always brought 
> me back to the list anyway), I have finally decided which way to go to 
> filter access to two SSIDs, for 2 groups.
> I am using FR 2.1.11 on Debian squeeze, against an AD domain with LDAP 
> membership lookup. I have 5 AP registered with FR, they each have 2 
> SSIDs that show in the request as MACADDRESS:SSID_ABC.
> Based on Phil Mayers  on this post, 
> http://freeradius.1045715.n5.nabble.com/How-do-I-have-one-Freeradius-server-hosting-multiple-ldap-instances-and-associate-each-SSID-with-pare-td2847210.html#a2850433 
> ,
> I would like to match the last 8 characters of the Called-Station-Id, 
> "SSID_ABC"
>
> authorize {
>    if (Called-Sation-Id == SOMEREGEX:SSID_ABC) {
>      update request {
>        Tmp-String-0 = "Staff"
>      }
>    }
>    elsif (Called-Sation-Id == SOMEREGEX:SSID_DEF) {
>      update request {
>        Tmp-String-0 = "Students"
>      }
>    }
> }
>
> Everything is working great, this is the last piece of the puzzle to 
> finalize the project.
> I understand, this does not have anything to do with the wonderful 
> software that freeradius is, but from what I have read, lots of people 
> on this list are very skilled with regex. Thank you so much for all 
> the work and help you put in here.
>
>
> Tossi
> -
> List info/subscribe/unsubscribe? See 
> http://www.freeradius.org/list/users.html
>

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html




More information about the Freeradius-Users mailing list