Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Regular expressions that cross lines (johndcook.com)
2 points by ibobev 19 days ago | hide | past | favorite | 1 comment


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: