Find linefeed (hex 0A) by itself - not next to carriage retu

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
acanfield
Posts: 2
Joined: Wed Aug 03, 2005 3:28 pm

Find linefeed (hex 0A) by itself - not next to carriage retu

Post by acanfield »

I need to remove several thousand Linefeed characters (hex 0A) from a large Tab delimited file. The record endings are CRLF (0D0A) but there are numerous linefeed characters followed by spaces that were inserted in the original Access database -- as soft carriage returns within a record that are screwing up the file as they are causing inappropriate breaks in records.

I've tried to use a regular expression of \x0A to look for the linefeed character, but I always get the error "Cannot find regular expression: '\0A'

However, it will work if I use one of the Textpad defined regular expressions (e.g. \t will find tabs.

Is there a predefined regular expression for a linefeed by itself (without CR). Or how do I get the Find to work with the \xdd regular expression.

Thank you!
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

Which have you used in your regular expression?
\0a or \x0a (the second one should work)
You say \x0a, but your error message states \0a


If not, you could use the "Hex" radiobutton in the left lower box of the search/replace dialog.
doc6502
Posts: 5
Joined: Wed May 21, 2003 5:42 pm

Post by doc6502 »

I'm sure there's a way to do it with regex, but I'm terrible with those.

I'd just change '\0a0d' to something unrecognizable like '\0e0f' and then change the remaining solo '\0a' entries to whatever, and then change '\0e0f' back to '\0a0d'.
acanfield
Posts: 2
Joined: Wed Aug 03, 2005 3:28 pm

Post by acanfield »

That's what a colleague suggested, only I did it using XVI32 because I couldn't figure out how to get the regular expressions to work in TextPad.
Post Reply