Regular Expressions 101

Convert an LDIF from DS A into LDIF in DS B in one Regex

1

Regular Expression
PCRE (PHP <7.3)

/
dn: \t"CN=(.*?),OU=(.*?),DC=(PACRIM1|global|honeywell|namerica1|namerica2|namerica3|namerica4),.*\t\tdescription:\t\t(.*)\tdisplayName: \t\t(.*)\t\thwObjectGUID: \t\t(.*)\t\textensionAttribute7: \t\t(.*)\t\tmail: \t\t(.*)\t\tobjectClass: \t\t(.*)
/
g

Description

If you need to convert an LDIF exported from one directory to an LDIF in another directory, replacing the DN and attr names from one to the other

Submitted by anonymous - 8 years ago