substring attribute up to first space character

Morris, Andi amorris at cardiffmet.ac.uk
Thu Jun 12 10:27:09 EDT 2014


Thanks Peter,
That gives me something to work on :)

Cheers,
Andi

-----Original Message-----
From: users-bounces at shibboleth.net [mailto:users-bounces at shibboleth.net] On Behalf Of Peter Schober
Sent: 12 June 2014 15:20
To: users at shibboleth.net
Subject: Re: substring attribute up to first space character

* 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
--
To unsubscribe from this list send an email to users-unsubscribe at shibboleth.net


More information about the users mailing list