Yes. You can set it to be excluded using regular expression (regex).
- Go to Settings > Library > Exclusions.
- Click on Excluded Video Patterns or Excluded Image/Gallery Patterns depending on type of content you want to exclude.
- Click Edit.
- Enter valid regex and click Confirm.
Note
There is a useful regex101 site that can help you experiment and test with regex.
See Stash in-app documentation for some examples: