I'll work it out myself then ;-)
Thanks all!
<quote who="Gavin Henry">
> <quote who="Nigel Metheringham">
>> Hi Gavin,
>>
>>> Is this list for discussions of developing PCRE, or developing code
>>> using PCRE?
>>
>> Primarily focused on the former. However as there is no dedicated or
>> focused forum for PCRE use that would be welcome here too. Should there
>> be issues with traffic and focus later we can re-arrange things then.
>
> Excellent. I'll ask away then.
>
> I'm currently designing a small OpenLDAP Core Overlay using PCRE, to apply
> a regex to attribute values and apply captures (or not) to a configured
> string etc., then return that in a search response.
>
> Kind of like a sed on attribute values. For things like:
>
> "/home/users/(.*)" and returning "/home/$1" etc.
>
> configured like so via "cn=config" or slapd.conf:
>
> <overlay> <attr-name> <search_basedn> <regex> <string>
> valregex-attr homeDirectory dc=example,dc=com /home/user/(.*) /home/$1
>
> The subject is the attribute value and the regex is the re ;-)
>
> I'm really after advice on the best practice to apply the captures etc. on
> the configured string and if there is something in PCRE to ease this, or
> if it's just best to do it by hand.
>
> Thanks for your time,
>
> Gavin.
>
> --
> Kind Regards,
>
> Gavin Henry.
> OpenLDAP Engineering Team.
>
> E ghenry@???
>
> Community developed LDAP software.
>
> http://www.openldap.org/project/
>