Regular expressions that cross lines
Posted by ibobev 12 hours ago
Comments
Comment by bediger4000 8 hours ago
Good discussion of an interesting problem, and some obscure Gnu grep arguments to fix it.
I don't know the mechanics of Cook's writing habits, but would "semantic line breaks" have helped in this situation? "the Section" would almost certainly occur in a single line if he did semantic line breaks. I know that a lot of people find it difficult to do them, particularly if they've done a lot of MS-Word style text processing.
Rob Pike's "Structural Regular Expressions", the kind implemented in the Sam text editor, would also have eased finding the problem raw text.