[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-07 Thread Diego Mesa
Hey Josiah It was the last point you made that really clarified it for me - the difference engine visualization confused m. Thanks! Diego On Thursday, March 7, 2019 at 11:59:36 AM UTC-6, @TiddlyTweeter wrote: > > Diego, > > You are right. It does look odd. But it IS working fine. The reason

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-07 Thread @TiddlyTweeter
Diego, You are right. It does look odd. But it IS working fine. The reason why it appears odd is ... -- you run in "multi-line" mode and that means the match string always matches to first point that matches in the field. In this case the last two letters of This". -- because your match

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-07 Thread Mohammad
SNR is released as a plugin. This thread is closed here and a new thread is started to discuss the SNR plugin. To follow the discussion from new thread have a look at https://groups.google.com/d/msg/tiddlywiki/mkx1hZVH-I4/IeyC_GccBAAJ I appreciate your feedback --Mohammad -- You received

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-06 Thread Mohammad
Hello Diegi! I think the SNR does the job correctly! May be Josiah can explain this in detail, but replace keep the parts in replaceValue and only add those characters word is not available in the search value! Here it actually change This ---> This not This > This not }> This

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-06 Thread Diego Mesa
Hey Mohammad, I have the following strange behavior: https://media.giphy.com/media/dgarQbGE4SycN4wGJF/giphy.gif On Wednesday, March 6, 2019 at 3:49:32 PM UTC-6, Mohammad wrote: > > *Update: Mar 7th, 2019* > > Changes: > >- new interface >- regexp flags can be selected among *i, g,m* but

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-06 Thread Mohammad
*Update: Mar 7th, 2019* Changes: - new interface - regexp flags can be selected among *i, g,m* but not *g and m* at the same time. - minor issues fixed Demo: http://kookma.tiddlyspot.com/(temporarily site ) Mohammad -- You received this message because you are subscribed to

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-06 Thread Mohammad
Okay, Josiah! I correct it! --Mohammad On Wednesday, March 6, 2019 at 7:59:11 PM UTC+3:30, @TiddlyTweeter wrote: > > Mohammad, > > Excellent! > > An issue. You should not have Multi-line AND Global BOTH enabled! > > They are mutually exclusive. > > > [image:

Re: [tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-06 Thread Mohammad
Many thanks Jeremy! It seems I should read and process the replaceValue first and then pass it to SNR macro! By the way, I think this way I can handle control characters. Best wishes Mohammad On Wednesday, March 6, 2019 at 8:26:31 PM UTC+3:30, Jeremy Ruston wrote: > > Hi Mohammad > > Sorry I

Re: [tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-06 Thread Jeremy Ruston
Hi Mohammad Sorry I missed your question in the thread. If you're trying to get a control character into a string for use in a regexp, you can use a construction like this: <$codeblock code={{{ [[%0a]decodeuricomponent[]addprefix[a]addsuffix[b]] }}}/> The idea is to express the character in

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-06 Thread @TiddlyTweeter
Mohammad asked: > ... please let me know, if snr has any conflict with regexp or pass TW ... > There are NO unique problems in SNR. Relax :-). TW issues we know already are not SNR issues per se. They are broader ... 1 -- Tiddlers containing strings * """ * can't be safely matched, 2 --

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-06 Thread @TiddlyTweeter
Mohammad, Excellent! An issue. You should not have Multi-line AND Global BOTH enabled! They are mutually exclusive. [image: {B8C55E38-08DD-4CC0-8A36-68B8ADA7732A}.png.jpg] Best wishes Josiah -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-06 Thread Mohammad
*Announcement: SNR2* *Update: Mar 6th, 2019* Changes: - regexp flags added (g, m, i) - whole words search added - minor issues fixed This tool has amazing feature: You can search no only the text filed but also tags, caption, creator, ... and any other fields You can even search and

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-06 Thread Mohammad
Okay! I am achanging the interface and will upload a new update within an hour. --Mohammad On Wednesday, March 6, 2019 at 5:29:59 PM UTC+3:30, @TiddlyTweeter wrote: > > M, > > In particular, *multi-line mode* is excellent! Great news! > > It allows step by step changes. > > J. > > On Wednesday,

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-06 Thread @TiddlyTweeter
M, In particular, *multi-line mode* is excellent! Great news! It allows step by step changes. J. On Wednesday, 6 March 2019 14:52:51 UTC+1, Mohammad wrote: > > Many Thanks Josiah! > > I would appreciate your time teaching us how to use regexp in Tiddlywiki > and specially here with SNR2. >

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-06 Thread Mohammad
One more comment: I am not good at regexp, but I think snr should follow what is reule/standard in Tiddlywiki, so I think we need to change the code to act as the current regexp operator (https://tiddlywiki.com/#regexp%20Operator) So, please let me know, if snr has any conflict with regexp or

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-06 Thread Mohammad
Josiah! I appreciate if you put these comments in few tiddlers to added as help to SNR2. --Mohammad On Wednesday, March 6, 2019 at 5:10:19 PM UTC+3:30, @TiddlyTweeter wrote: > > Mohammad & all interested > > I have done a lot of testing of "s-n-r2". It is very good! > > > *DIFFERENCES FROM

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-06 Thread Mohammad
Many Thanks Josiah! I would appreciate your time teaching us how to use regexp in Tiddlywiki and specially here with SNR2. For the issue you mentioned, I could not find any solution and Jeremy comments did not help me to understand what I should do! By the way, I thought it is better to choose

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-06 Thread @TiddlyTweeter
Mohammad & all interested I have done a lot of testing of "s-n-r2". It is very good! *DIFFERENCES FROM NORMAL REGEX* It differs from normal regular expressions in that TiddlyWiki needs to guard itself from eating itself. *It does this by needing the regex to be wrapped in Quote Marks*.

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-05 Thread @TiddlyTweeter
I'm not sure how much TiddlyWiki users understand regular expressions. There are TWO basic modes. When flag m ("multi-line") is enabled matching is for only the FIRST match to the regular expression. When flag g ("global") is enabled the match is repeated until no further matches are

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-05 Thread @TiddlyTweeter
Ciao Mohammad It works fine! Its different and useful. "m" mode allows STEPS on changes that "g" doesn't. It is possible that your tool could support both m and g ? Best wishes Josiah -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-05 Thread Mohammad
Yes, It is possible! Save and reload and it should works. --Mohammad On Tuesday, March 5, 2019 at 11:15:31 PM UTC+3:30, @TiddlyTweeter wrote: > > Ciao Mohammad > > I request that the m flag be enabled to be toggled ON. > > In some ways it might be better if m mode were the DEFAULT as its

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-05 Thread @TiddlyTweeter
Ciao Mohammad I request that the m flag be enabled to be toggled ON. In some ways it might be better if m mode were the DEFAULT as its far less dangerous than g . FYI, I found it quite easy to get it run using "m" flag just by changing the JS code from "g" to "m" ... like this ...

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-04 Thread @TiddlyTweeter
Exactly right. On Monday, 4 March 2019 22:29:16 UTC+1, Mohammad wrote: > > Yes, I got it. I am experimenting to see how resolve the issue. > The same is true for tab character \t > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-04 Thread Mohammad
Yes, I got it. I am experimenting to see how resolve the issue. The same is true for tab character \t --Mohammad On Tuesday, March 5, 2019 at 12:48:57 AM UTC+3:30, @TiddlyTweeter wrote: > > Mohammad > > The issue is simply that we can get the MATCH well. But on REPLACE we > might need to

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-04 Thread @TiddlyTweeter
Mohammad The issue is simply that we can get the MATCH well. But on REPLACE we might need to INSERT additional things that MATCH did not find. Hope this is clear! Josiah On Monday, 4 March 2019 21:54:46 UTC+1, Mohammad wrote: > > Hi Josiah, > Seems it is true, have a look at > >

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-04 Thread @TiddlyTweeter
Great site. Jan Goyvearts is one of my favourite programmers. He is the KING of Regular Expressions. On Monday, 4 March 2019 21:54:46 UTC+1, Mohammad wrote: > > Hi Josiah, > Seems it is true, have a look at > >

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-04 Thread Mohammad
Hi Josiah, Seems it is true, have a look at https://www.regular-expressions.info/replacenonprint.html --Mohammad -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-04 Thread @TiddlyTweeter
The issue in the case is the Replace, not the Match. Its about ADDITIONAL INSERT of "\nl" that the JS won't natively provide Hope this is clear! Josiah On Monday, 4 March 2019 21:18:50 UTC+1, Mohammad wrote: > > Hello Josiah, > Thank you for your comments! > SNR2 simply use the JS replace

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-04 Thread Mohammad
Hello Josiah, Thank you for your comments! SNR2 simply use the JS replace function. So, everything is possible with JS replace theoretically should be possible with SNR2. By the way I will investigate the case! --Mohammad On Monday, March 4, 2019 at 11:06:10 PM UTC+3:30, @TiddlyTweeter

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-04 Thread @TiddlyTweeter
This is a footnote. Just FYI. Regular Expressions are one of the few things I understand well. So IF anything I write about them seems difficult to understand please ask for clarification. Best wishes Josiah -- You received this message because you are subscribed to the Google Groups

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-04 Thread @TiddlyTweeter
An issue ... Take this case ... [image: {4FE0AE98-959D-41B0-AC8D-E1450D37143C}.png.jpg] This replaces tags with ```. The issue is to also add newlines before and after the backticks. As far as I can see the only way to get newlines into the replace pattern is via using a Capturing Group.

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-04 Thread @TiddlyTweeter
Ciao Mohammad I have a few requests and comments. I'll write them in separate posts. First, can both the Search & Replace boxes be made a lot WIDER? Some regex get long! Best wishes Josiah -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-04 Thread Mohammad
Hi Josiah Many thanks. I will upload a new update. I fixed the issue. I appreciate your time for evaluating the code and welcome your write up. Best Mohammad -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-04 Thread @TiddlyTweeter
Ciao Mohammad I studied it more. You CAN use it to match > but you need the search entry to be wrapped in quote-marks. Similarly if you want to find double quote marks " you need to wrap them in quote marks of a different type. To make best use of this powerful tool I think it needs user

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-03 Thread Mohammad
Many Thanks! Yes, I checked and it seems `>` break the codes! I will have look to see how I can fixed it. Cheers Mohammad On Sunday, March 3, 2019 at 2:43:54 PM UTC+3:30, @TiddlyTweeter wrote: > > Ciao Mohammad > > I'll do lots of testing of SNR2 on http://kookma.tiddlyspot.com/ and > report

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-03 Thread @TiddlyTweeter
Ciao Mohammad I'll do lots of testing of SNR2 on http://kookma.tiddlyspot.com/ and report back. It looks very good and very powerful! The is one BUG I found already. You can easily see it. Just enter ">" in the search box and it breaks the script like this... [image:

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-03-02 Thread Mohammad
*SNR2 announced.* SNR2 uses a small JS macro and can do search and replace in tiddler fields. It is a flexible tool can perform search-n-replace in case-sensitive, case-insensitive wholewords, ... manner It also accept sregular expression so from this point of view is really powerful. It can

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread Mohammad
Hello Thomas, Many thanks for your feedback. The problem is with snr as it uses some filter operators not simply work with with regexp expression, if so I personally prefer to have \t, \n, ... and like that in search area! Cheers Mohammad On Friday, March 1, 2019 at 1:19:19 AM UTC+3:30, Thomas

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread BurningTreeC
> > Hi Mohammad, thank you, that looks very useful! > > Regarding carriage (really?) returns, Josiah and BTC, > > I would prefer a textarea that looks like an input field – but with the > option to expand when needed. Like so: > > <$edit-text tiddler="test" field="demo" tag="textarea" rows="1"

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread Thomas Elmiger
Hi Mohammad, thank you, that looks very useful! Regarding carriage (really?) returns, Josiah and BTC, I would prefer a textarea that looks like an input field – but with the option to expand when needed. Like so: <$edit-text tiddler="test" field="demo" tag="textarea" rows="1" autoHeight="yes"

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread David Gifford
Oh, sorry, I came here because I thought you wrote "ASMR" plugin... On Thursday, February 28, 2019 at 12:54:26 AM UTC-6, Mohammad wrote: > > Announcement: SNR > > This is a simple script, search-n-replcae (*snr*) to search in tiddler > contents (including all fields) for a searchValue and

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread BurningTreeC
> > BTC > > That is good news!! > > Rather than have a text area could it be done via substitution? > No that's too complicated I'm not even going to give the try a thought ;) > I'm thinking of the complexity of the interface to have a text area just > for that. > For instance could,

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread @TiddlyTweeter
BTC That is good news!! Rather than have a text area could it be done via substitution? I'm thinking of the complexity of the interface to have a text area just for that. For instance could, with the example I gave, this work through the simple input fields ?... Search ... \r\r Replace

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread BurningTreeC
> > This is such a good tool Mohammad! > > I ask a final, probably, very difficult, question ... > > Can we match CARRIAGE RETURNS? And can we INSERT them in replacement > strings? > Hi Josiah, an sorry Mohammad, it can handle carriage returns, too. Just make the inputs where you write the

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread Mohammad
Josiah, With current situation, my answer is unfortunately NO! But the other macro I have developed can find and do *partial transclusion* https://kookma.github.io/find-macro/ So, a mix of these two can do the job, but needs extra programming to work together. --Mohammad On Thursday,

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread @TiddlyTweeter
This is such a good tool Mohammad! I ask a final, probably, a very difficult, question ... Can we match CARRIAGE RETURNS? And can we INSERT them in replacement strings? Here is a simple example ... The man was on the burning deck His light was dim And he got bogged. To do that you need

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread Mohammad
Josiah, Have a look ate TW roadmap: https://tiddlywiki.com/static/RoadMap.html It gives hope for the feature we like! --Mohammad On Thursday, February 28, 2019 at 7:24:17 PM UTC+3:30, @TiddlyTweeter wrote: > > Diego Mesa wrote: >> >> In my mind, an "undo function" is synonymous with "version

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread @TiddlyTweeter
Diego Mesa wrote: > > In my mind, an "undo function" is synonymous with "version control". > I agree. Kinda. Though likely more short term than normal VC. Mohammad wrote: > But I am afraid duplication tiddlers in this way will result in huge file >> size. >> > I agree it would *if it were

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread Mohammad
Hi Diego, That's absolutely correct! and seems the safer solution. --Mohammad On Thursday, February 28, 2019 at 6:56:50 PM UTC+3:30, Diego Mesa wrote: > > In my mind, an "undo function" is synonymous with "version control". > > On Thursday, February 28, 2019 at 9:19:10 AM UTC-6, Mohammad

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread @TiddlyTweeter
Mohammad The problem is, it will fail to distinguish punctuation. So, it can find > " test " but not " test!". For my use cases that does does not matter at all! It is "*exact string replace*" and it works very well. I'm using it fine, often without any leading or trailing space. The

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread Diego Mesa
In my mind, an "undo function" is synonymous with "version control". On Thursday, February 28, 2019 at 9:19:10 AM UTC-6, Mohammad wrote: > > Yes, an undo function is possible to not overwrite the original tiddlers. > But I am afraid duplication tiddlers in this way will result in huge file >

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread Mohammad
Yes, an undo function is possible to not overwrite the original tiddlers. But I am afraid duplication tiddlers in this way will result in huge file size. --Mohammad On Thursday, February 28, 2019 at 6:19:57 PM UTC+3:30, @TiddlyTweeter wrote: > > Mohammad > > Really excellent. Its working well

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread Mohammad
Josiah, I can add a simple logic as whole word option but here whole word means a word separated from other part of the text by two spaces. The problem is, it will fail to distinguish punctuation. So, it can find " test " but not " test!". Anyway, snr can do many search and replace jobs, but

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread Mohammad
Mario, I forgot to say, I am using the below template to have macro visible https://kookma.github.io/search-n-replace/#%24%3A%2F.mr%2Fviewtemplate%2Fshow-contents-macro-tiddler --Mohammad On Thursday, February 28, 2019 at 3:51:14 PM UTC+3:30, PMario wrote: > > On Thursday, February 28, 2019 at

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread Mohammad
Thank you Mario! and I appreciate your comment. Cheers Mohammad On Thursday, February 28, 2019 at 3:51:14 PM UTC+3:30, PMario wrote: > > On Thursday, February 28, 2019 at 7:54:26 AM UTC+1, Mohammad wrote: >> >> Announcement: SNR >> >> This is a simple script, search-n-replcae (*snr*) to search

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread @TiddlyTweeter
Mohammad Really excellent. Its working well and I haven't been able to get it to fail. It will have huge use I am sure. I do think an issue is UNDO. Let me show why ... On a balmy day SHE took advice that HE needed to walk. If we replace "SHE" with "HE" we get ... On a balmy day HE took

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread @TiddlyTweeter
Email users ... An error in my test code was fixed > !! Test of S-n-R ... > > >//''Instructions'': In the following, using steps in s-n-r: (1a) replace > "she" with "he" in all the variant case styles; (1b) replace the first > capitalised "HE" with "SHE"; (1c) replace the final capitalised

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread @TiddlyTweeter
Mohammad wrote: > > Announcement: SNR > Very good indeed! Thank you! To fully test it I created a difficult test case. Its very achievable, but the user needs to pay careful attention step by step. Here is that test case ... !! Test of S-n-R ... >//''Instructions'': In the following, using

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread PMario
fixed a typo in the last post :) -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To post to this group, send email to

[tw5] Re: SNR: Search and Replace in Tiddler Fields

2019-02-28 Thread PMario
On Thursday, February 28, 2019 at 7:54:26 AM UTC+1, Mohammad wrote: > > Announcement: SNR > > This is a simple script, search-n-replcae (*snr*) to search in tiddler > contents (including all fields) for a searchValue and replace them with > replaceValue. > Nice work! --- OT