Which regexp did you use to parse the value? You didn't tell us yet the syntax for the string after the '=' sign.
--
Ronald Fischer <ynnor@mm.st>
| [reply] |
Thanks Ronald, I have customised it further and using split command to get the value:
if(/\bdn:(.*)/) {
$value=$1;
@val = split (/,/, $value);
print "$val[0]";
last;
This gives me what I need.
Original Value:
dn: ou=Sample-Collaboration, ou=assets, o=abc.com
Expected Value:
ou=Sample-Collaboration
is there any other way around to get it?
| [reply] |
/\bdn:\s*ou=([^,]*)/
This would store everything between the ou= and the first comma.
--
Ronald Fischer <ynnor@mm.st>
| [reply] [d/l] |