diff --git a/phpcs.xml.dist b/phpcs.xml.dist
index 63fa5373c1c138..746b4c3860fabe 100644
--- a/phpcs.xml.dist
+++ b/phpcs.xml.dist
@@ -31,9 +31,9 @@
- lib/compat/*
- packages/block-library/src/*
- build/block-library/*
+ /lib/compat/*
+ /packages/block-library/src/*
+ /build/block-library/*
@@ -50,28 +50,28 @@
./post-content.php
- ./packages/block-serialization-spec-parser/parser.php
- node_modules/*
- build/*
+ /packages/block-serialization-spec-parser/parser\.php$
+ /node_modules/*
+ /build/*
- ./vendor/*
- ./test/php/gutenberg-coding-standards/*
+ /vendor/*
+ /test/php/gutenberg-coding-standards/*
- ./lib/compat/wordpress-*/html-api/*.php
+ /lib/compat/wordpress-*/html-api/*\.php$
/phpunit/*
- packages/block-library/src/navigation/index.php
+ /packages/block-library/src/navigation/index\.php$
- ./test/gutenberg-test-themes/*
+ /test/gutenberg-test-themes/*
@@ -85,9 +85,9 @@
- ./phpunit/*
- ./packages/*
- ./bin/generate-gutenberg-php
+ /phpunit/*
+ /packages/*
+ /bin/generate-gutenberg-php\.php$
@@ -100,7 +100,7 @@
- ./packages/block-library/src/*/*.php
+ /packages/block-library/src/*/*\.php$
@@ -154,15 +154,15 @@
- ./packages/block-library/src/*/*.php
+ /packages/block-library/src/.+/*\.php$
- ./packages/block-library/src/form-input/index.php
- ./packages/block-library/src/form-submission-notification/index.php
- ./packages/block-library/src/form/index.php
+ /packages/block-library/src/form-input/index\.php$
+ /packages/block-library/src/form-submission-notification/index\.php$
+ /packages/block-library/src/form/index\.php$