The comments for match_word() in pattern.c mention that delimiters at the start or end of the input string will be ignored, but this is not mentionned in the documentation. Backport to all supported versions.