[RADIATOR] Handler regex for User-Name matching help

Gregory Fuller gregory.fuller at oswego.edu
Fri Sep 10 13:25:05 CDT 2010


So after a lot of googling and playing around with different
combinations I came up with the following:

/^(?!CP-)(?!-SEP([0-9a-fA-F]{12}$))/

It sort of works.  It doesn't match when I feed it the username
(CP-7942G-SEP2893FE127C54) -- which is exactly what I'm looking for (I
don't want it to match).

But I get the following when trying other usernames:

Username			Condition		Results
---------------------------------------------------------------------------------------------------------------------------
signup			doesn't match	expected
signup-SEP2893FE127C54	doesn't match	expected
CP-7942G-SEP2893FE127C5	matches		expected
CP-signup-SEP2893FE127C5	matches		expected
CP-signup			matches		not expected (should NOT match)

As you can tell I'm not a regular expression person.  :)  Any ideas?

--greg


More information about the radiator mailing list