I’ve created a Tinderbox note from Readwise that contains chapter-by-chapter excerpts, where each chapter begins with a number and the chapter title in all caps.
I’d like to explode this master note into notes at the chapter title line, e.g. “8 A NEW DEMOGRAPHIC”, using the regex “^\d+.*$”. Though BBEdit tells me this regex works, I’m doing something wrong in Tinderbox because none of the lines are recognized.
Any guidance would be appreciated!
Just off the top of my head, I’d try looking for paragraphs beginning with a digit
^[0-9]
Does that give you what you’d expect? This sort of simplification is helpful when debugging. Of course, this might general false positives, but it’s a starting point.
Yes! and thanks for helping me finally understand why “^” can work in something like BBEdit but in Tinderbox it’s actually finding the start of $Text, rather than the start of each line in $Text.
I think my aTbRef notes are off here. Recently, Tinderbox moved fully off the old BOOST library onto Xcode regex libraries. Perhaps that made a difference in relation to ^ and ~$`. Anyway, I’ll check.