[tw5] Re: How modify this regexp?

2020-03-08 Thread TiddlyTweeter
Mat wrote: > > TT - that does seem to work! Great!!! > It should work fine. The two cases it will fail in are ... -- When the problem is nested (I don't think that will happen for the OP). -- When the item is the LAST in sequence. (That can be addressed but avoid it if it its not absolutely

[tw5] Re: How modify this regexp?

2020-03-08 Thread Mat
Meanwhile, I added this request at gh: Filter op to extract regexp from string which argues for a set of filter ops (or even a single filter op) that stems from the most basic use case I can think of. Do go there and express your

[tw5] Re: How modify this regexp?

2020-03-08 Thread Mat
TT - that does seem to work! Great!!! For anyone curious, I have this: A tiddler with this arbitrary text title:tid text: Welcome to TiddlyWiki <>notebook for. And this is my testing code (at the moment): <$set name=re value='(<])*?)([<]{2})'> <$set name=txt filter='[[tid]get[text]]'> txt:

[tw5] Re: How modify this regexp?

2020-03-08 Thread TiddlyTweeter
On last notice it can't detect nested issues of your OP. It could be done. Just would get baroque. Probably not needed. TT On Sunday, 8 March 2020 13:16:10 UTC+1, TiddlyTweeter wrote: > (This is pretty difficult to get right.) > > > Its a very interesting regex issue. Regex often looks

[tw5] Re: How modify this regexp?

2020-03-08 Thread TiddlyTweeter
> > (This is pretty difficult to get right.) Its a very interesting regex issue. Regex often looks counter intuitive. Using negatives can get complicated. It IS possible to match the needed in one regex. But you would have to chop off the suffix since we can't currently do that by silent

[tw5] Re: How modify this regexp?

2020-03-08 Thread TiddlyTweeter
Ciao Mat I'd also test this with "< > IMO you can _not_ detect this pattern in 1 run. You would have to find >> every appearance with: <> you have to see if contains >> .. If yes -> OK ... If no problem. >> > > OK, I don't think it is necessary with one step for EditorMagic > considering

[tw5] Re: How modify this regexp?

2020-03-08 Thread TiddlyTweeter
PMario wrote: > > The best description about regexp I've ever found is: > https://www.regular-expressions.info/javascript.html > > They describe it in a way that I actually could understand and modify by > myself. > I agree. There is a depth of context in that site that is very helpful in

[tw5] Re: How modify this regexp?

2020-03-08 Thread TiddlyTweeter
> > (Hm, why do my projects hit the outer limits so often?) I think at least two of your recent ones are related to the current lack of a way under the TW rexexp filter operator to be able return capture groups. This limits what you can do with regex in filters and requires a kind of coding

[tw5] Re: How modify this regexp?

2020-03-08 Thread Mat
Mark S. wrote: > > PR 2963 > i.e Returns text of input selection that matches regexpr - yes, that would be needed here. I would also think #4452 Memory variable filter ops is

[tw5] Re: How modify this regexp?

2020-03-08 Thread Mat
> > IMO you can _not_ detect this pattern in 1 run. You would have to find > every appearance with: < you have to see if contains >> .. If yes -> OK ... If no problem. > OK, I don't think it is necessary with one step for EditorMagic considering how it is the text of a single tiddler that

[tw5] Re: How modify this regexp?

2020-03-07 Thread 'Mark S.' via TiddlyWiki
On Saturday, March 7, 2020 at 2:03:23 PM UTC-8, PMario wrote: > > > 1 regexp filter can't handle this. Especially, since our filters return > tiddler names and not regexp capture groups, which would be needed. > > > PR 2963 -- You received this message because you are subscribed to the

[tw5] Re: How modify this regexp?

2020-03-07 Thread PMario
On Saturday, March 7, 2020 at 10:21:28 PM UTC+1, Mat wrote: > > More compact: > > Find the *first* "< ...that is not followed by ">>" (where signifies any number of > characters, including none) > ...OR that IS followed by "<<" or character/s that is forbidden > inside a short

[tw5] Re: How modify this regexp?

2020-03-07 Thread Mat
More compact: Find the *first* "<>" (where signifies any number of characters, including none) ...OR that IS followed by "<<" or character/s that is forbidden inside a short form macro call. (This is pretty difficult to get right.) <:-) -- You received this message because you

[tw5] Re: How modify this regexp?

2020-03-07 Thread Mat
Lorem ipsum Lorem ipsum <> lorem impsum <> and <> lorem. ... I think it can be phrased as: Find the *first* "<>" or ">>" (where signifies any characters) ...OR that IS followed by "<<" or "<<" (or, for that matter, any other forbidden characters inside a short form macro call)

[tw5] Re: How modify this regexp?

2020-03-07 Thread PMario
On Saturday, March 7, 2020 at 9:33:11 PM UTC+1, Mat wrote: > > The actual need is to catch the *unclosed* < potentially surrounded by completed <> > hihi, .. That's a different thing :) > > Lorem ipsum > > Lorem ipsum <> lorem impsum <> and < bar>> lorem. > ... > > So the end of the line

[tw5] Re: How modify this regexp?

2020-03-07 Thread Mat
Much appreciated that you're looking at this! ...and your post makes me realize I am asking the totally wrong question (Doh!!! I got confused from dabbling with this so I forgot what I'm actually in need of) :-/ The actual need is to catch the *unclosed* <> Lorem ipsum Lorem ipsum <> lorem

[tw5] Re: How modify this regexp?

2020-03-07 Thread PMario
Hi, Are you sure, you want prefix[Draft] instead of !prefix[Draft] ?? It only detects tiddlers in draft mode atm. -m -- 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

[tw5] Re: How modify this regexp?

2020-03-07 Thread PMario
Hi Mat, The best description about regexp I've ever found is: https://www.regular-expressions.info/javascript.html They describe it in a way that I actually could understand and modify by myself. -mario -- You received this message because you are subscribed to the Google Groups

[tw5] Re: How modify this regexp?

2020-03-07 Thread PMario
Hi, I did modify the code in the first post to use a regexp: <> .. The first version was greedy so it found: <> some more text >> instead of <> -mario -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop

[tw5] Re: How modify this regexp?

2020-03-07 Thread PMario
Hi Mat, How can this regexp be modified to accept any text that has <> > For me this: <$set name=re value="<>"> {{{ [all[tiddlers]prefix[Draft]!is[current]regexp:text] }}} does the trick. -mario -- You received this message because you are subscribed to the Google Groups "TiddlyWiki"