Skip to content

Instantly share code, notes, and snippets.

@imathis
Created June 27, 2012 19:45
Show Gist options
  • Save imathis/3006330 to your computer and use it in GitHub Desktop.
Save imathis/3006330 to your computer and use it in GitHub Desktop.
Tweetbot can use regular expressions to mute tweets in your timeline and mentions.

Hashtag abuse

Three or more hashtags.

#[^#]+#[^#]+#

Long hashtags (15+ characters): #hashtagpunchline

#[^ ]{15}

CamelCase hashtags (3+ Words): #NotSelfAware

#[^a-z ]+[^A-Z ]+[^a-z ]+[^A-Z ]+[^a-z ]+[^ ]*

Painful to read

Unforgivable word shortening: I'm near ur place r u busy?

\sur\s
\sr\s
\su\s

Mass conversations (4+ Mentions): @guy @dude @otherguy @man totally.

@[^@]+@[^@]+@[^@]+@

Retweet chains (2+ RTs): OMG RT @teengirlsquad RT @beebz I'm thinking of you.

RT[^RT]+RT

Mentions with only a URL (spam): @imathis tinyurl.com/spam

^@imathis *https?://[^ ]+$
@willeccles
Copy link

For the 3 hashtags one, I would have said (#[^# ]+[ ]*.*){3} 😄
Yours will not catch the 3rd hashtag completely, in a tweet such as "#magic is #cool and I also like the # sign." The third # is not a hashtag, but it still is counted as one.

@realrolfje
Copy link

realrolfje commented Nov 12, 2017

In recent developments, I would add:

Mute tweets longer than 140 characters: [^]{140}

See https://twitter.com/rolfje/status/929643146002255872

Apparently that does not work correctly, and .{140} means I loose all 140 char tweets with expanded links in them. I think this requires more work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment