regex in cas-protocol.xml
Paul B. Henson
henson at cpp.edu
Mon Feb 22 15:34:03 EST 2016
Are the regular expressions used in cas-protocol.xml implicitly bound to the beginning of the line and the end of the line? 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 without a $ binding the match to the end of the line? 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 :)...
Thanks...
More information about the users
mailing list