substring attribute up to first space character

Peter Schober peter.schober at univie.ac.at
Thu Jun 12 10:19:40 EDT 2014


* Morris, Andi <amorris at cardiffmet.ac.uk> [2014-06-12 15:11]:
> Would somebody please be able to help me to create an attribute
> definition for an Active Directory's description field but only up
> to the first space character? We already have LDAP setup, and can
> successfully pull other fields from there, but it's the substring
> I'm really struggling to work out.

Maybe the examples near the end of this page will help?
https://wiki.shibboleth.net/confluence/display/SHIB2/ResolverMappedAttributeDefinition
Something like this:

  <DefaultValue passThru="true" />
  <ValueMap>
    <ReturnValue>$1</ReturnValue>
    <SourceValue>^(.+) .*$</SourceValue>
  </ValueMap>

-peter


More information about the users mailing list