Mapped attribute and regex not returning expected result
Lipscomb, Gary
glipscomb at csu.edu.au
Mon Apr 30 18:52:12 EDT 2018
Hi,
I'm using the following to include all digits up to the first Alpha character from the employeeNumber
<AttributeDefinition xsi:type="Mapped" id="employeeNumber_NO_Apha" sourceAttributeID="employeeNumber">
<Dependency ref="ldap" />
<DisplayName xml:lang="en">Employee Number</DisplayName>
<AttributeEncoder xsi:type="SAML1String" name="urn:mace:dir:attribute-def:employeeNumber" />
<AttributeEncoder xsi:type="SAML2String" name="urn:oid:2.16.840.1.113730.3.1.3" friendlyName="employeeNumber" />
<ValueMap>
<ReturnValue>$1</ReturnValue>
<SourceValue>^(\d*)(.?)</SourceValue>
</ValueMap>
</AttributeDefinition>
If the employeeNumber is
12345678 it returns 12345678 as expected
12345678A it returns 12345678 as expected
1234A it returns 1234 as expected
1234A5678 it returns nothing but I expected 1234. The attribute is not populated
Using https://regex101.com/ the above expression returns Group 1 as '1234' and Group 2 as 'A'
Any suggestions
Regards
Gary
| ALBURY-WODONGA | BATHURST | CANBERRA | DUBBO | GOULBURN | MELBOURNE | ORANGE | PORT MACQUARIE | SYDNEY | WAGGA WAGGA |
LEGAL NOTICE
This email (and any attachment) is confidential and is intended for the use of the addressee(s) only. If you are not the intended recipient of this email, you must not copy, distribute, take any action in reliance on it or disclose it to anyone. Any confidentiality is not waived or lost by reason of mistaken delivery. Email should be checked for viruses and defects before opening. Charles Sturt University (CSU) does not accept liability for viruses or any consequence which arise as a result of this email transmission. Email communications with CSU may be subject to automated email filtering, which could result in the delay or deletion of a legitimate email before it is read at CSU. The views expressed in this email are not necessarily those of CSU.
Charles Sturt University in Australia The Grange Chancellery, Panorama Avenue, Bathurst NSW Australia 2795 (ABN: 83 878 708 551; CRICOS Provider Number: 00005F (National)). TEQSA Provider Number: PV12018
Consider the environment before printing this email.
More information about the users
mailing list