regex in cas-protocol.xml
Tom Scavo
trscavo at gmail.com
Mon Feb 22 15:59:08 EST 2016
On Mon, Feb 22, 2016 at 3:43 PM, Marvin Addison
<marvin.addison at gmail.com> wrote:
> 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
>
>> 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+)?/"
>
> That. What you provided should be equivalent.
No, the two sets of REs are not equivalent since they match different
sets of strings. Whether that's significant depends on how they're
used.
Tom
More information about the users
mailing list