I am using the below plugin to fetch tweets and display them.
Within the plugin is a filter feature, and the below regex filters out all tweets on the account which are replies:
filter: function(t){ return ! /^@\w+/.test(t.tweet_raw_text); }
I wish to now build on this filter to only display tweets which contain the hashtag ‘#capetowntrains’
Can anyone assist me with the correctly formed RegEx statement?
Thanks for the help
Regards
Devin
Should just need to change it to this
We only keep things that are not replies and also contain #capetowntrains.
EDIT: and if you want it to be case insensitive (note the added
i)