Regex (or whatever) help please
-
Hi all,
I am stuck trying to get the last step in the re-formatting of this file and I am hoping there is a way (other than RBAR manual processing) to accomplish this. What I have is this sort of thing:
GEASLER
SARA L GEASLER,SHERMAN
MATTHEW J SHERMAN,
Which I would like to eliminate the blank lines and combine the other two as so:
GEASLER, SARA L GEASLER,
SHERMAN, MATTHEW J SHERMAN,I have tried and failed at all I knew and tried a few things I didn’t, no joy in Mudville. If someone could give me a push in the right direction I would greatly appreciate it.
-
Let’s get some joy back in Mudville before the big strikeout.
It appears your data can be thought of as three lines per person, the first two lines with data, the third line as empty. This is the best I can assume from what you’ve shown. If that is true, and assuming Windows line endings of CR+LF are desired, then…
Find what box:
(?-s)(.+?)\r\n(.+?)\r\n\r\n
Replace with box:\1,\x20\2\r\n
Search mode:Regular expression…should take you a long way.
-
Thank you very much, I will get done what the boss wants and then com back and figure out how and why it worked. Always good to understand something better. Thanks again!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login