Comment -- Regular Expressions in TW

43 views
Skip to first unread message

@TiddlyTweeter

unread,
Mar 27, 2019, 9:11:22 AM3/27/19
to TiddlyWiki
TiddlyWiki and Regular Expressions go together like a hand in a glove. The core parsers use them extensively.

Mohammad recently made (excellent!) RegEx wiki-wide actionable: https://kookma.github.io/TW-Commander/ (see "snr" tab)

RegEx is one of the few things I understand. They are not exactly precise coding. They are more like crossword puzzles. You looking in "match" to capture ALL but ONLY. 

But a lot of confusion for beginners arises in that Regex are Context Dependent.  There is NO perfect Regular Expression. Say it again: There is NO perfect Regular Expression. Its a pragmatic tool, not a perfect one.

So its very important to test your use case with example data first.

With those caveats ... RegEx does things really well. Its likely the most useful tool for preparing stuff and for tidying up.

An aside
Josiah


@TiddlyTweeter

unread,
Mar 27, 2019, 9:12:01 AM3/27/19
to TiddlyWiki
Repeat for those on email.
Reply all
Reply to author
Forward
0 new messages