Page 1 of 1

Some enhancements to search and search and replace.

Posted: Mon Oct 20, 2003 2:27 am
by Steven Isaac
Recently I have had the unenviable pleaser of restoring a whole system from backup tapes for a client. For reasons that I’ll not bore you with, we had to edit a backup listing to obtain all the file names that would be stored.
During this exercises it became apparent the modern text editors have lost some of the futures that used to exist in their predecessors the humble text processors that are still the only way to manipulate text on some of the lager platforms. As a result it was much, much easer to use the old faithful text process Tedit on the Tandem to get this job done, it took 2 minutes to do so.

Some of the futures would really be nice to have on modern text editors:
1)- The ability to specify columns in searches or search and replace
2)- Negation in searches or search and replace i.e. NOT containing search text
3)- The ability to manipulate or search for start of line, space, and carriage return in searches or search and replace – if I recall correctly you could replace carriage return in the pervious version of TextPad.

Posted: Mon Oct 20, 2003 3:00 am
by Bob Hansen
1)- The ability to specify columns in searches or search and replace
2)- Negation in searches or search and replace i.e. NOT containing search text
3)- The ability to manipulate or search for start of line, space, and carriage return in searches or search and replace – if I recall correctly you could replace carriage return in the pervious version of TextPad
I think that TextPad can do all of the above.

:idea: 1. You can use RegEx to ID column start position.

:idea: 2. The negation can be done by using Find, Bookmark All, then Toggle Bookmarks.

:idea: 3. You can also use Regex to replace carriage returns (\n).

Posted: Mon Oct 20, 2003 8:09 am
by MudGuard
Addition to Bob:

1)
.{37}whatever searches for whatever in column 38

3)
- Search for space is no problem, just put a space in the Find box (either in RegEx or in non-Regex mode

- Search for start of line by putting a ^ in Find box and turn Regex on

- Search for end of line by putting a $ in find box and turn Regex on (as an alternative you could search for \n as Bob stated, but there is a small difference - if you replace $ the linebreak will still exist, if you replace \n, the linebreak is removed)