(keyword)
| 11 | |
| 12 | |
| 13 | def _compile_regex(keyword): |
| 14 | # Surround the keyword with word boundaries and replace interior whitespace |
| 15 | # with whitespace wildcards |
| 16 | pattern = "\\b" + white_space_regex.sub(r"\\s+", keyword) + "\\b" |
| 17 | return re.compile(pattern, re.MULTILINE | re.IGNORECASE) |
| 18 | |
| 19 | |
| 20 | keywords = get_literals("keywords") |