[tw] Re: Query: Are Regular Expressions Regular in TW?

2017-09-29 Thread codacodercodacoder
Bingo! Thank you Mark, that's a really useful addition to my toolbox. On Friday, September 29, 2017 at 7:46:54 PM UTC-5, Mark S. wrote: > > Thank you for the feedback. > > There was a bug in the javascript macro. I've attached a new version. > > Also, for your finder filter, you (probably) need

[tw] Re: Query: Are Regular Expressions Regular in TW?

2017-08-26 Thread 'Mark S.' via TiddlyWiki
According to the regexp operator tiddler at tiddlywiki.com: The filter syntax makes it impossible > to directly specify a regular expression that contains square brackets. The > solution is to store the expression in a variable >

[tw] Re: Query: Are Regular Expressions Regular in TW?

2017-08-26 Thread @TiddlyTweeter
Ciao Mark S. & all ... I have an issue using character sets in square brackets. A case came up on the #buddha stuff, covered earlier in this thread, I overlooked. Occasionally I'd include a web address in a Tweet ... ... https://steamradio.com/buddha.html#BuddhaLink Under the current regex

[tw] Re: Query: Are Regular Expressions Regular in TW?

2017-08-25 Thread 'Mark S.' via TiddlyWiki
PR #2963 Mark On Wednesday, August 23, 2017 at 5:55:14 PM UTC-7, PMario wrote: > > > IMO you should create a PR at github. > > -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

[tw] Re: Query: Are Regular Expressions Regular in TW?

2017-08-25 Thread 'Mark S.' via TiddlyWiki
This version will return sub-groups for non-global searches. So in codacoder's example, this search: <$list filter='[tag[TestGroups]get[text]regexps[(?g)bk-ann ".+"]regexps[bk-ann "(.+)"]]' > will change this: <>X > > and > > < macros">> > > Into Explain the use of

[tw] Re: Query: Are Regular Expressions Regular in TW?

2017-08-25 Thread codacodercodacoder
Thomas!!! Awesome (not a word a throw around like confetti). Just AWESOME!!! I recall we talked about textstretch when it was "new", quite some time ago. I ended up going my own route with *bk-ann* (and a couple of others, like *bk-note* and *bk-problem* which use different colors and are

[tw] Re: Query: Are Regular Expressions Regular in TW?

2017-08-25 Thread @TiddlyTweeter
Ciao Mark S. Many thanks. I'll test it out and get back to you... Mark S. wrote: > > Another version of regexps to play with. This version will pull out all > matches at once when the global flag is used. So the filter could look like: > > "[get[text]regexps[(?g)#\w+\b]tolower[]]" > >

[tw] Re: Query: Are Regular Expressions Regular in TW?

2017-08-24 Thread codacodercodacoder
Excellent Thomas - thank you. I'll grab it later (or tomorrow, more likely) and let you know how it goes. Danke! On Thursday, August 24, 2017 at 4:50:23 PM UTC-5, Thomas Elmiger wrote: > > Hi Codacoder > > Something like synopsis extraction exists in an experiment I developed > some time

[tw] Re: Query: Are Regular Expressions Regular in TW?

2017-08-24 Thread Thomas Elmiger
Hi Codacoder Something like synopsis extraction exists in an experiment I developed some time ago: https://tid.li/tw5/numbers.html#Chapter%201:%5B%5BChapter%201%5D%5D%20Footnotes Here I extract footnotes from a text using my extract macro based on existing TW5 technology.

[tw] Re: Query: Are Regular Expressions Regular in TW?

2017-08-24 Thread codacodercodacoder
Hi Mark On Thursday, August 24, 2017 at 2:59:52 PM UTC-5, Mark S. wrote: > > Regular expressions in javascript can return sub-groups for non-global > expression searches. It might be possible to implement this in regexps, if > someone can think of a good use-case. Mostly, instead of

[tw] Re: Query: Are Regular Expressions Regular in TW?

2017-08-24 Thread 'Mark S.' via TiddlyWiki
Another version of regexps to play with. This version will pull out all matches at once when the global flag is used. So the filter could look like: "[get[text]regexps[(?g)#\w+\b]tolower[]]" It might not make a difference in this use-case, but perhaps in some other situation. Notes: The

[tw] Re: Query: Are Regular Expressions Regular in TW?

2017-08-23 Thread PMario
On Wednesday, August 23, 2017 at 11:18:23 PM UTC+2, Mark S. wrote: > > After install, your hashtag2tag filter could look like > > [list[!!text]regexps[#\w+\b]tolower[]] > IMO you should create a PR at github. -m -- You received this message because you are subscribed to the Google Groups

[tw] Re: Query: Are Regular Expressions Regular in TW?

2017-08-23 Thread @TiddlyTweeter
Ciao Mark S. WHOAH! *Utterly BRILLIANT*. Its absolutely spot-on for what I need. It also seamlessly dealt with the tricky case of double quotes I couldn't figure out. Perfect for this kind of job. Can't thank you enough. For readers who maybe not understand quite what is going on, Mark S.

[tw] Re: Query: Are Regular Expressions Regular in TW?

2017-08-23 Thread 'Mark S.' via TiddlyWiki
I'm playing with version that does replacement with regexp. Based on original regexp code with a couple of tweaks. Seems to work. Absolutely make backups, because sometimes one gets blind-sided by subtle discrepancies as I discovered with the seemingly simple tolower filter. After install,

[tw] Re: Query: Are Regular Expressions Regular in TW?

2017-08-23 Thread codacodercodacoder
On Wednesday, August 23, 2017 at 1:19:35 PM UTC-5, @TiddlyTweeter wrote: > > > I am aware there is a regexp operator, but can it RETURN its exact match > for processing, or is it what it looks like: a match with something IN a > field it adds to a list to display but then the match itself is