I have some lines of tab delimited data, and I want pipe-delimited (and terminated) data. Since I have a leading tab, I search for '\t|$' and replace with '\|'. This creates and infinite loop -- it finds the line ending, replaces it with a '|' and finds the new line ending.
Replacing all \ts and $s separately works fine. But, 64-bit TextPad 7.4.0 can't handle the 'or' condition. Or something.
'Replace All' finding '\t|$' finds line ending infinitely
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 6
- Joined: Fri Mar 03, 2006 3:19 pm
Trying searching for (\t|$) rather than \t|$
If I am correct in understand that you have a leading tab you wish to retain, you could try this. This approach assumes there are no \xFF characters in your file.
RE Replace
Find: ^\t
Replace: \xFF
RE Replace
Find: \t
Replace: \|
RE Replace
Find: ([^\|])$
Replace: $1\|
RE Replace
Find: \xFF
Replace: \t
If I am correct in understand that you have a leading tab you wish to retain, you could try this. This approach assumes there are no \xFF characters in your file.
RE Replace
Find: ^\t
Replace: \xFF
RE Replace
Find: \t
Replace: \|
RE Replace
Find: ([^\|])$
Replace: $1\|
RE Replace
Find: \xFF
Replace: \t
(2[Bb]|[^2].|.[^Bb])
That is the question.
That is the question.
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm