| # A script to scan PCRE2's man pages to check for typos in the control |
| # sequences. I use only a small set of the available repertoire, so it is |
| # straightforward to check that nothing else has slipped in by mistake. This |
| # script should be called in the doc directory. |
| while (scalar(@ARGV) > 0) |
| open (IN, $file) || die "Failed to open $file\n"; |
| printf "Empty line $line of $file\n"; |
| ^\.\\"\sHTML\s<a\shref="[^"]+?">\s*$| |
| ^\.\\"\sHTML\s<a\sname="[^"]+?"><\/a>\s*$| |
| printf "Bad control line $line of $file\n"; |
| elsif (/\\[^ef]|\\f[^IBP]/) |
| printf "Bad backslash in line $line of $file\n"; |
| printf "Mismatching formatting in line $line of $file\n"; |