regex in cas-protocol.xml

Marvin Addison marvin.addison at gmail.com
Mon Feb 22 15:43:18 EST 2016


On Mon, Feb 22, 2016 at 3:34 PM Paul B. Henson <henson at cpp.edu>

> The two examples in the file:
>
> c:regex="https://([A-Za-z0-9_-]+\.)*example\.org(:\d+)?/.*"
> c:regex="http://([A-Za-z0-9_-]+\.)*example\.org(:\d+)?/.*"
>
> Do not include a ^ to bind the match to the beginning of the line, but
> they do include an explicit .* at the end which really should not be needed


I tend to terminate regexes with ".*" any time I mean "everything
following" which will include more data to be matched than without, which
is usually what I want.


> If they are not implicitly bound, would the above regular expressions also
> function as:
>
> c:regex="^https://([A-Za-z0-9_-]+\.)*example\.org(:\d+)?/"
> c:regex="^http://([A-Za-z0-9_-]+\.)*example\.org(:\d+)?/"
>
> I guess everybody probably has their own style for writing regular
> expressions :)...
>

That. What you provided should be equivalent.

M <users-unsubscribe at shibboleth.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20160222/e59f4941/attachment.html>


More information about the users mailing list