in reply to Match a string that can contain a carriage return in a random position.

After inspecting an example file (courtesy of LDAP Data Interchange Format, I think that you can safely set the input record separator to:

$/ = 'dn:';

With this, you can apply regexes as necessary to any data within each multiline "dn:" record without having to worry about the newlines.

Where do you want *them* to go today?
  • Comment on Re: Match a string that can contain a carriage return in a random position.
  • Download Code