I'd guess "\." is being (or should be) caught as an invalid escape
seuqence, so I might suggest trying one of two things:
1. double back-whack the regex:
^http://people\\.oregonstate\\.edu/~morgan/.*
or
2. enclose "." in a character class
^http://people[.]oregonstate[.]edu/~morgan/.*
E.g. if you tried the original regex in vanilla Java with
Pattern.compile(regex).matcher(input).matches();
or
Pattern.matches(regex,input);
I think it'll throw an error like "illegal escape character" (on
compile). And depending on the number of parsing levels (Spring?), if
the double escape doesn't work, you might need additional levels of
escapes e.g.: ^http://people\\\\.oregonstate\\\\.edu/~morgan/.*
All this can get kind of messy so IMO the "[.]" notation might be easier
to read and maintain.
Interesting comparison: the regex parser for e.g. the Shibboleth
attribute filter doesn't require double back-whack. Maybe the XML parser
looks at the strings as character arrays. Dunno.
Tom.
On 04/04/2014 03:22 PM, Andrew Morgan wrote:
> I've been trying to use a regular expression in the service registry
> without any luck. I'm running v3.5.2. I have an existing ant-style
> pattern that works:
>
> http://people.oregonstate.edu/~morgan/**
>
> I tried to convert this to a regex:
>
> ^http://people\.oregonstate\.edu/~morgan/.*
>
> I get:
>
> Unauthorized Service Access for Service: [
> http://people.oregonstate.edu/~morgan/CAS-1.3.2/test.php ] - service is
> not enabled in the service registry.
>
> I tried various permutations based on my knowledge of Perl regular
> expressions, but I couldn't make it work.
>
> What am I doing wrong?
>
> Thanks,
> Andy
>
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user