Working with bookmark lines

General questions about using TextPad

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

Post Reply
JasonGH
Posts: 7
Joined: Sat Dec 07, 2013 12:24 am
Location: VA, USA

Working with bookmark lines

Post by JasonGH »

Hi,

How can I just simply search and replace on bookmarked lines only, ignoring the rest in a text file?

Thanks
ben_josephs
Posts: 2459
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Unfortunately you can't do that. But perhaps you can achieve the same thing using a regex. Can you provide details?
User avatar
AmigoJack
Posts: 500
Joined: Sun Oct 30, 2016 4:28 pm
Location: グリーン ヒル ゾーン
Contact:

Post by AmigoJack »

Ben, as a longtime low priority goal: could "bookmarked lines" be a new search/replace scope? I'd use this to simulate multiple text selections instead of only having one.
ben_josephs
Posts: 2459
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

That's a question for Helios. I'm only an end user.
User avatar
AmigoJack
Posts: 500
Joined: Sun Oct 30, 2016 4:28 pm
Location: グリーン ヒル ゾーン
Contact:

Post by AmigoJack »

Then I misjudged you for a longer time.

I found Ability to limit Find/Replace scope to bookmarked lines from 2003-10-26 - if it hasn't been implemented in ~18 years I'm somewhat pessimistic it will ever be.
JasonGH
Posts: 7
Joined: Sat Dec 07, 2013 12:24 am
Location: VA, USA

Post by JasonGH »

Here is the example:

þHeadersþ
þ1þ^þxxxxxxx....
þ2þ1þ^þxxxxxxx....
þxdsfdfd
kalfjadfodl
þ3þ^þxxxxxxx....
þdfdfdsfsdfds
dfasdfdsfsdfds
þ4þ^þxxxxxxx....
....
....

a DAT file with thousands of lines (records) starting from 1 to....Headers can be up to 100 fields separated by þ^þ. Each record should start with þ and a number. For some reasons, some of the field values shifted down extra lines. I want to bring them up. End result should be like this:

þHeadersþ
þ1þ^þxxxxxxx....
þ2þ1þ^þxxxxxxx....
þ3þ^þxxxxxxx....
þ4þ^þxxxxxxx....

Thank you,
Post Reply