Replacing the tab "\t" character in text files.
I had to replace "tab" characters in a text file today and I wasn't able to find the an answer on the net very quick. However I was able to get lucky based on my experience with regular expressions and textpad.
I am using textpad version 4.4.1
My data looked like this (tab separated)
10.10.10.1 10.10.10.154
I need it to look like this
10.10.10.1 - 10.10.10.154
For input into a SQL discovery tool, but that is a different blog post.
Anyway I loaded the original data into textpad, went to the replace feature input the regular expression seen below

and WHAM! I got my results.
It really wasn't much of an issue but was a pain to find. Good luck, maybe this can save someone time.
I am using textpad version 4.4.1
My data looked like this (tab separated)
10.10.10.1 10.10.10.154
I need it to look like this
10.10.10.1 - 10.10.10.154
For input into a SQL discovery tool, but that is a different blog post.
Anyway I loaded the original data into textpad, went to the replace feature input the regular expression seen below

and WHAM! I got my results.
It really wasn't much of an issue but was a pain to find. Good luck, maybe this can save someone time.

0 Comments:
Post a Comment
<< Home