Page 1 of 1

Using \t, cant replace a character with a tab

Posted: Fri Dec 05, 2003 12:16 am
by cglenn
Using V4.7.0. I have a tab delineated text file. The programmer messed up a little, and some fields are separated by a fence (|) instead of a tab.

Under the replace context help, note #3, says to use \t . This does not work. All it did was replace fences with \t's.

Known problems did not have a topic on this. Forum search for replace tab \t had 550 hits, none relevant in the first many. Tried replace and tab and \t and got two hits, neither with my problem.

Posted: Fri Dec 05, 2003 12:38 am
by CyberSlug
On the serach&replace dialog window you need to click the checkbox for "use regular expressions"

Otherwise, you could copy a tab character to the clipboard and paste it to the replace field.

Hope that helps

Posted: Fri Dec 05, 2003 12:59 am
by cglenn
Bingo. That little regular expressions detail wasn't in the help notes. Thank-you.

Posted: Fri Dec 05, 2003 7:37 am
by MudGuard
On that page, it says at the top:

Replacement expressions are used to substitute text in conjunction with Tagged Regular Expressions, when using the Replace command.

And it says at the bottom:

Beware of replacing a pattern that is matched with a regular expression that can optionally match nothing, such as ".?" or "a*". In these degenerate cases, TextPad can go into a loop, until the line becomes too long.


Two hints that the stuff is for Regular expression replacement...