Not track links containing a specific word

Hello,

I have been using matomo for a short time, and I would like to know if there is a method (by Javascript) to exclude specific urls from tracking, for example:
exclude URLs that contain the word “test”.

thank you,