19726Re: Search and Replace and increment number at the same time
- Sep 30, 2009--- In email@example.com, "isola_60185" <isola_60185@...> wrote:
>Yes, the clip code to do it follows.
> Might be way off base, I am not a seasoned NoteTab Pro user, nor
> am I a progammer.
> If I have strings in a txt file that look like this:
> Is there any way I can Search and Replace so that I can increment
> each number (by 20 for example) so that the numbers look like:
> I have about 100 occurences of these numbers (they are for xy
> coordinates) and I need to increment them. There are _no_ numbers
> that repeat, all our unique.
> I think I'm asking if NoteTab can recognize these strings as
> numbers and then do a math operation on them but using a wildcard
> as the search.
> So search for /y=* and substitute the wildcard with the number+20.
^!Find "/y=\K\d+" RS
^!InsertText ^$Calc(^$GetSelection$ + 20)$
^!Prompt All Done
;end of clip
- << Previous post in topic Next post in topic >>