I have an ldif file which is exported from LDAP and its got thousands of lines and some of the DN's are spilted into two lines. How can we can join those lines.
I can do shift J, but since I have thousands of lines that is not good idea.
This is not easy to do with TextPad's regex recogniser because of its limited functionality by the standards of modern tools.
But this should solve your specific problem. It searches for lines whose first character isn't a d or whose second character isn't an n. This is messy and can't readily be genaralised to other similar problems.
Find what: \n([^d]|.[^n])
Replace with: _\1[Replace the underscore with a space]
[X] Regular expression
Replace All
This assumes you are using Posix regular expression syntax: