A regex that matches 10 or more consecutive hashtags (after some other text). I use this to filter out spammy Mastodon posts.
Last active
September 1, 2025 08:56
-
-
Save teroyks/d1b76945b91e43205f26fc330aab4005 to your computer and use it in GitHub Desktop.
hashtag regex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (\s+#[A-Za-z_]+){10,} |
Author
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Does not match: #JustAFew #hashtags
This will match. #FirstHashtag #TheSecondOne #third #fourth #fifth #sixth #seventh #eight #ninth #tenth