Page 1 of 1
Delete all characters between cursor and specific text
Posted: Wed Dec 29, 2010 4:49 pm
by scottatbhm
Hi, and thanks in advance for your help. I'm editing some huge medical records for a hospital and I have to remove variable length strings of characters from the cursor up to a specific text string, and leave the string intact.
Posted: Wed Dec 29, 2010 7:36 pm
by MudGuard
If the find string is a fix string (not a regex):
Create a macro that does the following:
1. find, with "Extend Selection" checked. (This selects the text from cursor position to end of find string).
2. Use shift-cursorleft for as many positions as the find string is long (this removes the find string from the selection, you might also go back whole words if appropriate by using ctrl-shift-left).
3. Delete the selection.
Posted: Wed Dec 29, 2010 10:52 pm
by scottatbhm
Thanks Mudguard, that worked quite well.