Page 1 of 1
Override Textpad's replace character limit?
Posted: Mon Jan 23, 2012 8:35 pm
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?
Posted: Mon Jan 23, 2012 11:00 pm
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.
Posted: Tue Jan 24, 2012 1:22 am
by ak47wong
I thought the OP had a long replacement string, not a long search string.
Posted: Tue Jan 24, 2012 2:10 am
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.
Posted: Tue Jan 24, 2012 2:16 am
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

Posted: Tue Jan 24, 2012 8:02 am
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.
Posted: Tue Jan 24, 2012 1:19 pm
by arconis
So it looks like they'll have to do it in the program itself correct?
Posted: Tue Jan 24, 2012 2:12 pm
by ben_josephs
Yes, it's a TextPad restriction. There's nothing a user can do about it.