Cd.K
Thanks for sharing back. I expect the scheduled solution is the best
however;
On returning I had a thought. Place this in a tiddler on tiddlywiki.com
Filter-Var: <$edit-text tiddler="$:/temp/filtervar" tag=input/><br>
Filter: <$edit-text tiddler="$:/temp/filter" tag=input/> can also use
`<filter-var>`<br>
<$set name=filter-var value={{$:/temp/filtervar}}>
<$set name=filter value={{$:/temp/filter}}>
<$list filter={{$:/temp/filter}}>
</$list>
</$set>
</$set>
Then enter in filter-var
201909(0[1-9|1[0-5])
And in filter reference filter-var
[regexp:created<filter-var>]
Basically this make possible the introduction of a variable to the filter
used in the search, as one has to do when using regex with square brackets
in wikt text.
This could also be used to test the use of subfilters
Filter-var
title text modified modifier created creator tags type list caption
Filter
[fields[]!subfilter<filter-var>]
So I wonder if there was a way to allow the setting of a variable in the
advanced search filter tab would be useful. It would only work if included
in the filter.
Or alternatively use {$:/temp/filtervar} in the advanced search filter
[fields[]!subfilter{$:/temp/filtervar}]
Or in the original example
Enter in filter-var
201909(0[1-9|1[0-5])
And in advanced search filter reference filter-var tiddler
[regexp:created{$:/temp/filtervar}]
And there is yet another option:
in a tiddler tagged $:/tags/Macro
Place
\define varname() 201909(0[1-9|1[0-5])
and use <varname> in your advanced filter
[regexp:created<varname>]
I have tested all of the above and they work
Regards
Tony
On Monday, September 23, 2019 at 1:03:28 PM UTC+10, Cd.K wrote:
>
> TonyM
>
> Advanced Search with regexp:created and nested square brackets:
>
>
> [image: 23-09-_2019_04-48-05.png]
> The solution is surprisingly simple and requires only a few changes in `
> $:/core/modules/filters.js` (see issue #4267).
> <https://github.com/Jermolene/TiddlyWiki5/issues/4267>
>
> Next step is to create the mod for the mod-loader plugin. As so often a
> link is missing in the description.
>
>
> Regards
> Cd.K
>
>
>
>
> On Saturday, September 21, 2019 at 3:52:36 AM UTC+2, TonyM wrote:
>>
>> Cd.K
>>
>> Yes, and alternate regex search tab that permits entry into a variable
>> could overcome this limitation. It could include more regex advice
>> including that which you ask for.
>>
>> Outside of regex and the inappropriate use of [ ] in title (not
>> recommended) I am not sure many would expose this issue. Perhaps a not can
>> be added in the documentation on tiddlywiki.com. Just edit a tiddler to
>> propose the change.
>>
>> Regards
>> Tony
>>
>> On Friday, September 20, 2019 at 9:22:10 PM UTC+10, Cd.K wrote:
>>>
>>> TiddlyTweeter
>>>
>>> I don't agree.
>>>
>>> I've stumbled across these very places. The problem ist that you can't
>>> set up variables in Advanced Search and this hint is missing. For those who
>>> know it, it's obvious, but not for newbies. It's not easy to get used to
>>> TiddlyWiki and such things make it unnecessarily difficult.
>>>
>>> BTW the use of RegExpr's in Advanced Search is massively restricted.
>>> Either a correct error message or a possibility in Advanced Search to set
>>> up variable(s) for the RegExpr operator via the interface of the tiddler -
>>> not in edit mode. It would also be correct to remove the RegExpr operator
>>> from Advanced Search. But nobody wants that.
>>>
>>> Regards
>>> Cd.K
>>>
>>> On Friday, September 20, 2019 at 12:49:33 PM UTC+2, @TiddlyTweeter wrote:
>>>>
>>>> Ciao Cd.K
>>>>
>>>> The "brackets problem" is actually documented at
>>>> https://tiddlywiki.com/#regexp%20Operator
>>>>
>>>> | The filter syntax <https://tiddlywiki.com/#Filter%20Run> makes it
>>>> impossible to directly specify a regular expression that contains square
>>>> brackets.
>>>>
>>>> There is also an example at:
>>>> https://tiddlywiki.com/#regexp%20Operator%20(Examples)
>>>>
>>>> I agree it might be highlighted more like this ...
>>>>
>>>> | The filter syntax <https://tiddlywiki.com/#Filter%20Run> makes it
>>>> impossible to directly specify a regular expression that contains regex
>>>> character class [...] brackets.
>>>>
>>>> Best wishes
>>>> TT
>>>>
>>>>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/628bdb4b-0faa-46b8-9040-82ab6f811231%40googlegroups.com.