Override Textpad's replace character limit?

General questions about using TextPad

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

Post Reply
arconis
Posts: 7
Joined: Wed Jan 18, 2012 6:38 pm
Contact:

Override Textpad's replace character limit?

Post by arconis »

I have a replace string that is 2,600 characters but Textpad won't let me enter the entire string?

Any way to get around this instead of having to find/replace 3 times?
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Select regular expressions.

Use the beginning of the target string and the end of the target string, and stick .* in between:
Beginning_of_string.*End_of_string
Ensure that the beginning and end strings are long enough so that the whole expression matches only instances of the target string.
Ensure that any regular expression special characters in the beginning or end strings are escaped with backslashes.
ak47wong
Posts: 703
Joined: Tue Aug 12, 2003 9:37 am
Location: Sydney, Australia

Post by ak47wong »

I thought the OP had a long replacement string, not a long search string.
arconis
Posts: 7
Joined: Wed Jan 18, 2012 6:38 pm
Contact:

Post by arconis »

Correct, I have 2,600 characters that I need to put in the Replace field but it's limiting the amount of text I can enter.
arconis
Posts: 7
Joined: Wed Jan 18, 2012 6:38 pm
Contact:

Post by arconis »

Just for the record NotePad Plus Plus lets me enter in the entire 2,651 character string.

Not trying to ruffle any feathers but it is relevant.


Strike that, it only lets me enter 2,046 character, bleh... A little better than TextPad's 1023....

Oddly its exactly double :?: :?: :?:
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Sorry. I answered the wrong question!

1023 = 2^10 - 1 (a power of 2, less 1 to make room for a null character at the end)
2046 = 2^11 - 2

Are you sure the NotePad++ figure isn't 2047?
Ah yes:
Here are v5.3.1 new features ...
1. Increase "Find what" and "replace with" fields to 2047 characters in Find/Replace dialog.
arconis
Posts: 7
Joined: Wed Jan 18, 2012 6:38 pm
Contact:

Post by arconis »

So it looks like they'll have to do it in the program itself correct?
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Yes, it's a TextPad restriction. There's nothing a user can do about it.
Post Reply