Thanks a lot .. that helped :)

On Monday, April 30, 2018 at 1:49:26 AM UTC+5:30, BJ wrote:
>
> you need to do it like this:
>
> var re = new RegExp(forvar, 'g');for (; i <= max; i += iter) {
>        textBuffer.push(text.replace(re, i));
> }
>
> all the best BJ
> On Sunday, April 29, 2018 at 4:03:52 PM UTC+2, Bala Chandra wrote:
>>
>> It replaces only the first instance of the forvar .. So i tried to modify 
>> the code of $:/plugins/tesseract/forloop/forloop.js  (
>> https://ibnishak.github.io/Tesseract/pluginsandmacros/index.html#Simple%20for-loop%20macro
>> )
>>
>>
>>         for (; i <= max; i += iter) {
>>             textBuffer.push(text.replace(forvar, i));
>>         }
>>
>>
>> to
>>
>>         for (; i <= max; i += iter) {
>>             textBuffer.push(text.replace(/forvar/gi, i));
>>         }
>>
>>
>> However, even then the code doesnt do a global replace ... any ideas?
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/d747fc99-d9b8-4aab-9c2d-02fd37ea1673%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to