💡 RegEx and/or SQL Wildcards: * % ? _ and issue #2963 in search field

86 views
Skip to first unread message

Cd.K

unread,
Oct 4, 2019, 12:04:46 AM10/4/19
to tiddl...@googlegroups.com
My first deeper TiddlyWiki experiences from this topic
didn't let me rest and I found the place where I could use RegEx and/or SQL Wildcards plus  #2963 returning all global matching   within a plugin.

04-10-_2019_05-13-40.png


Every search is converted to RegEx, i.e. in my example "mes" becomes "/(mes)/i" .

I often look for certain combinations of titles and tags and also system or shadow tiddlers. I would like to be able to enter all these searches here.

And now I'm thinking about working with clickable, meaningful and memorable emojis instead of some cryptic special characters.


Are there any known plugins that improve the search?


Regards
Cd.K


@TiddlyTweeter

unread,
Oct 5, 2019, 9:50:00 AM10/5/19
to TiddlyWiki
Cd.K

That is several questions in one :-)

Are there any known plugins that improve the search?

May not solve your issue but may help understand the territory: https://dynalist.io/d/zUP-nIWu2FFoXH-oM7L7d9DM#z=qvnb1tyGX-Zfd0n7kl_Moj-d
 
I often look for certain combinations of titles and tags and also system or shadow tiddlers. 

I agree that a "combinatorial" approach is optimal. Filters may be able to do it. But filter syntax can get complex.

Personally I like the idea of a "search matrix" where you could put a regex (or better click a button on "saved regex pattern") in each field you interested in.

It could be done. But I don't think it has been (I may be wrong! But I never seen that yet.)

Best wishes
TT

Cd.K wrote:
... didn't let me rest and I found the place where I could use RegEx ...
  
... Every search is converted to RegEx, i.e. in my example "mes" becomes "/(mes)/i" .

Cd.K

unread,
Oct 5, 2019, 9:58:58 PM10/5/19
to tiddl...@googlegroups.com
@TiddlyTweeter wrote:
 
I agree that a "combinatorial" approach is optimal. Filters may be able to do it. But filter syntax can get complex.
 
 
A really easy SEARCH syntax with full filter power under the hood!

Imagine the following scenarios for the "search"-input field where you want to search for tiddlers with the strings "mes" and/or "con":
  • mes
    default search field behavior
    every tiddler with "mes" match in fields: title, text OR tag

  • 🎯mes
    "direct hit at field" command
    every tiddler with "mes" match in field title (shorthand)

  • 📌title:mes
    "pinned field" command
    every tiddler with "mes" match in field title (long notation)

  • 🚫mes
    not operator/command
    every tiddler with "mes" not match in field title (shorthand)

  • 📌title🚫mes
    every tiddler with "mes" not match in field title (long notation)

  • 📌title:🚫mes
    every tiddler with "mes" not match in field title (longer notation)

  • 📌title:mes📌tag:con
    implicit AND linkage
    every tiddler with "mes" match in title and "con" in field tag

  • 📌title:mes🔗con📌tag:con
    explicit AND linkage
    every tiddler with "mes" AND "con" match in field title AND  "con" in field tag

  • 📌title/(mes)/i📌tag:con
    RegEx object syntax detection
    full supported RegEx

  • 📌title:/(mes)/i📌tag:con
    dito (longer notation)

  • 🔋🎯m*s
    "little power of battery" command
    SQL wild card search MS Access (full) dialect
    applicable to one field or the entire search string and can also be switched off individually for each field

  • 🔌🎯m%s
    "big power of power grid" command
    SQL wild card search MS SQL (full) dialect

  • mes📍📌tag:con
    logical OR linkage operator/command
    "mes" match in field title OR "con" match in field tag (shorthand)
     
  • 📌title🚫mes📍📌tag:con
    "mes" not match in title OR "con" match in tag  (long notation)

  • multiline search string
    each line choosable linked
    AND
    OR
The last point, however, needs to be analyzed in more detail.


I think the principle is clear.
You need emojis for every operator (TiddlyWiki Filter Operators). 

Or is there a graphic designer in the forum who could design TiddlyWiki search icons? 


And tomorrow I will post my ideas on how to use this with a super simple to use designed "search"-input field, so that "Advanced Search" is only needed in exceptional cases.

(But technically/internally the "search"-input field is a kind of remote control for the "Advanced Search" tiddler.)


Regards
Cd.K


















HansWobbe

unread,
Oct 6, 2019, 9:49:25 AM10/6/19
to TiddlyWiki
In my experience, this approach works very well.

I use a very few fields that contain "words" made up of an alphabet of UTF-8 symbols to find the possible (permutations and combinations) subsets I am specifically interested in.  By adding symbols like the Pin (and other Smilies or recognizable Unicode symbols or international airport signs) it becomes relatively easy to effectively create your own language that optimizes your mental abilities and the Search and Tag capabilities of TiddlyWiki.

This is actually analogous to the Words used in a natural language, if you consider the 26 letters of the English alphabet to be the coefficients of the positional notation base. e.g "ball" = 2x26^3 + 1x26^2 + 12x26^1 + 12x26^0

You can play with the math a bit to see that a long English word of say 20 characters would have 26^20-1 possible distinct meanings.  In short [ :-) ], the complete dictionary of English natural language can be thought of as an EXTREMELY sparse array, populated with a very few words.  And a good co-ordinate system to start working with is the 128 x 256 x 256 x 256 array of the Unicode symbols, which include some very useful subsets like the ranges for Mathematical symbols and Chinese Telegraphy code.


Reply all
Reply to author
Forward
0 new messages