Page 1 of 1

TextPad Macro Incrementing numbers +1

Posted: Fri Jan 22, 2010 11:19 pm
by mintz87
Hello,

I have been using TextPad and it's basic tools for years. Now i want to get into more of the advance stuff. I have a list:
=Datasheet!I94
=Datasheet!H94
=Datasheet!G94
=Datasheet!F94
=Datasheet!E94
=Datasheet!D94
=Datasheet!C94
That i want to increment the last 2 characters up by one

i.g.:
=Datasheet!I94
=Datasheet!H95
=Datasheet!G96
=Datasheet!F97
=Datasheet!E98
=Datasheet!D99
=Datasheet!C100

Can you tell me how to do this from scratch? i searched thru the forum on answers to other macro coding but i do not understand where and how to input the code. is it an .ini or .bat file? what language can i use? etc.

Thanks in Advance
Mintz

Posted: Sat Jan 23, 2010 2:43 pm
by ben_josephs
If you know in advance what number the sequence should start from, you can do this with a single search and replace action, using regular expressions:
Find what: (=Datasheet![A-Z])[0-9]+
Replace with: \1\i(94)

[X] Regular expression

Replace All
This assumes you are using Posix regular expression syntax:
Configure | Preferences | Editor

[X] Use POSIX regular expression syntax
Look in TextPad's help under
Reference Information | Regular Expressions,
Reference Information | Replacement Expressions,
How to... | Find and Replace Text | Generate Sequence Numbers and
How to... | Find and Replace Text | Use Regular Expressions.

Posted: Wed Feb 10, 2010 10:11 pm
by mintz87
After reading your post, the help docs you referred me and changing the settings in the Textpad - it is all good now.

appreciate your help!!