Hi Gerald, Please also see Jed's solution here: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/tiddlywiki/MBBVVsTb23M/CNhyN8RCAQAJ
Best regards, Hubert On Friday, 27 March 2020 11:51:43 UTC, Gerald Weis wrote: > > Hi Tony > > example-String > > That is a new testversion > > now i want it mak to a new (shorter )string > > <<substring title start end>> > <<substring "title" "9" "10"> Member for this <<substring "title" "16" > "19">> > > should given "a Member for this test" > > the number of characters could be mutable > > Am Freitag, 27. März 2020 12:15:42 UTC+1 schrieb TonyM: >> >> Gerald, >> >> It would be good if you gave a sample string and the result. >> >> See here, https://tiddlywiki.com/prerelease/#Filter%20Operators >> >> Any filter can be used to do this, but the triple braces are quick and >> easy >> >> \define source-field() title >> <$set name=string value={{{ [all[current]get<source-field>] }}}> >> >> >> ;Is one or some of these what you want? >> :First Character = {{{ [<string>split[]first[]] }}} >> :Last Character = {{{ [<string>split[]last[]] }}} >> :Count = {{{ [<string>split[]count[]] }}} >> :Length = {{{ [<string>length[]] }}} >> >> >> ;This is what split does, notice it removes the spaces (but not with >> count) >> {{{ [<string>split[]] }}} >> >> </$set> >> >> >> Regards >> Tony >> >> On Friday, March 27, 2020 at 5:34:17 PM UTC+11, Gerald Weis wrote: >>> >>> hi all >>> >>> I have an new projekt where i need an general substringfunktion >>> >>> the makro should work at the pattern "fieldname" "starting >>> characternumer which should be extracted" "last charcternumber wich should >>> extracted" >>> >>> the most used field is the field "title" of the current Tiddler. >>> but other fields of current tiddlers should be possible to for use. >>> >>> this substring must be printet in an other field as string. >>> >>> my skill ist not so good. >>> >>> >>> thanks for ideas >>> >> -- 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/55459ac3-e4ca-42d4-bb98-4ff2c7769c4c%40googlegroups.com.

