Find any letter at the end of a line, remove a line break without replacing the target

I am trying to collapse multiple lines of letters by one.

Example

>8445125
VSSSDEQPRPRRS
RNQDRQHPNQNRP
VLGRTERDRNRRQ
FGQNFLRDRKTIA


>8445125
VSSSDEQPRPRRSRNQDRQHPNQNRPVLGRTERDRNRRQFGQNFLRDRKTIA

      

I've tried regex Find [AZ] \ n Replace with empty. The problem is that it will remove the S, PQ and A that are at the end of each line. I need to do this without deleting those letters.

In this file, I would have> 1000 of the above.

+3


source to share


1 answer


You can change your regex as follows. The escape sequence \K

resets the start point of the reported match and any previously used characters are no longer included.



Find: [A-Z]\K\n

      

+3


source







All Articles