What about digits and words?
Chapter 1 General Provisions
^(Chapter \d\w+)
What about digits and words?
Chapter 1 General Provisions
^(Chapter \d\w+)
Thatâs not a bad idea (there is one small adjustment youâd need to make that idea work), but youâd probably want to improve it a bit to make sure it doesnât also match lines that begin with âChapter 12 discusses the role ofâŠâ, which donât have any punctuation in them. That might be a factor since you mention OCR, which often results in hard-wrapped lines rather than one long line for paragraphs.
If you can say for sure that there are no such lines, or so few of them you can weed them out later in proofing, then the way to express that would be:
^(Chapter [\w ]+)$
The square brackets let us make sets of valid characters that we need one or more of. In this case the only three valid types of characters are digits, letters or spaces. The \w includes digits, it means âword-likeâ characters, and actually also includes underscores (but that it does so probably doesnât matter for you).
I did just think of one other thing though: is this the same project you were using Convert Rich Text to MultiMarkdown on, in the compile settings? If so, putting hashes right into the text may not be the best approach, as Scrivener is going to think you mean those to print verbatim, and escape them so they arenât interpreted as Markdown. Unless youâve reconsidered that setting, you might need to take another tactic.
Itâs difficult, I still really do not understand how your project works. Youâve said that Pandoc creates a deep table of contentsâbut how if itâs just a bunch of plain-text documents? There has to be more going on than just that description, for that to happen. And why are there these few headings you have to delete hashes from, and why havenât those just been fixed in Scrivener?
I wish I knew. This was the result in the last project. I donât know how it happened; Iâm trying to duplicate it with the new project. I can send the recent project file if you want to look at it.
Okay! Well I am surely getting wires crossed if there are two projects going on at once then. Sure, if you can a send a copy that would help a lot. I could probably cook up a checklist for you that would help get in ship-shape, and if I can reproduce the hang, that would be nice too.
If anything it would be first-party since the regex engine is straight out of the Cocoa development frameworks. But I donât actually know, it doesnât matter too much as we have a clean reproduction to trigger it.
Is that missing a closing parenthesis?