Page 1 of 1

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

Posted: Wed Aug 03, 2005 3:40 pm
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!

Posted: Wed Aug 03, 2005 7:00 pm
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.

Posted: Wed Aug 03, 2005 7:10 pm
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'.

Posted: Wed Aug 03, 2005 7:20 pm
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.