diff --git a/tools/doc/html.js b/tools/doc/html.js
index 1c44c5f7d3c239..f2d3fcdbba6860 100644
--- a/tools/doc/html.js
+++ b/tools/doc/html.js
@@ -416,7 +416,7 @@ const BSD_ONLY_SYSCALLS = new Set(['lchmod']);
// 'open(2)'
function linkManPages(text) {
return text.replace(
- / ([a-z.]+)\((\d)([a-z]?)\)/gm,
+ /\b([a-z.]+)\((\d)([a-z]?)\)/gm,
(match, name, number, optionalCharacter) => {
// name consists of lowercase letters, number is a single digit
const displayAs = `${name}(${number}${optionalCharacter})`;