in reply to Parse proxyAddresses field of csvde export
Try
split /(?=(?:MRS|mrs|smtp|SMTP|[xX][45]00):)/, $value
(?=...) is zero-width positive look-ahead, which avoids that the matched fragment is being removed from the returned parts.
(?:...) is non-capturing grouping, which keeps split from returning any captures as extra elements.
For example, the result of splitting the first line would be
$VAR1 = 'smtp:Martin.Mueller@cde.org;'; $VAR2 = 'x500:/O=WGR/OU=DE-ABCSOMMERLAND-01/cn=Recipients/cn=J63042;'; $VAR3 = 'X500:/o=CKAG/ou=FIL/cn=Recipients/cn=J63042;'; $VAR4 = 'X400:c=DE;a= ;p=CKAG;o=FIL;s=Mueller;g=Martin;;'; $VAR5 = 'SMTP:Martin.Mueller@acme.net;'; $VAR6 = 'smtp:J63042@acme.net;'; $VAR7 = 'MRS:J63042@FIL.ckag.mrs';
|
|---|