Streams Plugin - Splitting text

125 views
Skip to first unread message

SteveH

unread,
Jun 25, 2021, 7:27:04 AM6/25/21
to TiddlyWiki

Hi,

A basic question relating to text splitting within a single long text tiddler.

The plugin settings show
  • Regular expression used to split text = /n/n
  • Split text at caret position
Inserting /n/n/ or a claret didn't seem to work . 

Looking for help here.

Regards

hsteve


SteveH

unread,
Jun 25, 2021, 8:09:59 AM6/25/21
to TiddlyWiki
*(sorry I tried \n\n per the plugin - didn't work.)

Saq Imtiaz

unread,
Jun 25, 2021, 8:42:57 AM6/25/21
to TiddlyWiki
- \n\n is a regular expression, so in text that corresponds to two line breaks.
- Splitting a longer tiddler is triggered by alt+enter (unless you have changed the keyboard shorcuts)

Si

unread,
Jun 25, 2021, 8:47:21 AM6/25/21
to TiddlyWiki
Hi hsteve. There are two ways to split text:

1. If you are editing a node and press enter, the stream will be split at the location of the caret/curser.
2. If you are editing a node and press alt+enter, the text will be split at every place there is a new line.

Note that /n/n is a regular expression that represents any new line. It's not something you have to actually add to the text.

SteveH

unread,
Jun 25, 2021, 5:56:21 PM6/25/21
to TiddlyWiki
Thank you Saq and Si for your help. Much appreciated.

SteveH

unread,
Jun 26, 2021, 5:41:18 AM6/26/21
to TiddlyWiki
Hi again,

I've  changed the settings to try using a word per:

Regular expression used to split text : /split/gi

- unfortunately can't get this to work.

Regards
hsteve

Saq Imtiaz

unread,
Jun 26, 2021, 11:28:22 AM6/26/21
to TiddlyWiki
Hi Steve,

trying using just split instead of /split/gi
Under the covers, the value provided is being used as an operand to the filter operator splitregexp:

Hopefully this will help you better formulate your regular expression. I'll add some disambiguation to the docs about this when I get the chance. 

Do note that this split feature was born out of a need to get data quickly into Streams for testing purposes during its development. As such it is a relatively simple implementation. Streams mostly focuses on writing content and dividing it into tiddlers as you write.

For a richer solution for splitting existing content, perhaps have a look at Notowritey:
Reply all
Reply to author
Forward
0 new messages