To try to explain what matching means, I'm going to start with an irritatingly opaque definition:Ī string matches a regexp if every part of the regexp matches a part of the string in the right order. In the context of Tweetbot's mute feature, the regexp behaves like a special keyword filter which is used to test the tweets in your timeline: any tweet that matches is muted. Regexp basicsĪ regexp is a string which is used to test other strings to see if they either match or don't match a pattern. It should give you a basic understanding of the syntax of regexps, explain how a couple of my filters work and allow you to start building your own. This tutorial isn't a complete description of regular expressions - people have written whole books on that. It occurred to me that they could form a quick introductory tutorial to regexps in general.įirst, an unavoidable jargon intermission: I'm going to use the programming term "string" to refer to any sequence of characters, because non-jargon terms like "word" or "sentence" are not general enough and would just confuse things, and otherwise we'll all get sick of me repeating the phrase "sequence of characters". ![]() Regular expressions, or regexps, are an incredibly handy way to match patterns in text: they date back to the earliest years of computing and are available in most programming languages.Ībout a month ago, I posted a regexp to filter out tweets about a certain Australian drug smuggler, and I was asked if I had any other examples. My favourite Twitter client, Tweetbot, allows muting not just by keyword but by regular expressions. Improve your Twitter experience with regular expressions Tweetbot 4.4 is available on the App Store.Twitter regexp muting Twitter regexp muting I’ve been happily using Tweetbot as my only Twitter client since version 4.0 launched – it’s still the best option by far on the iPad Pro, and it keeps getting better on each release. Between CloudKit sync, topics, and now filters, there’s even more of a contrast between the simplistic approach of Twitter’s app and Tapbots’ powerful take. Once again, Tapbots is differentiating Tweetbot from the official Twitter app in ways that make sense for power users. I’d like to see a way to add multiple-word keywords, such as quoting them or separating them by commas. Last, all keywords in filters are joined by an OR operator behind the scenes – there’s no way to filter by “iOS 10” as a full string instead of the words iOS or 10. I also would have liked to see the filter icon to be placed in the top title bar, not in the search bar with the current design, you can only activate a filter by scrolling all the way to the top first, whereas I’d like to filter my timeline as I’m catching up with it (say, after an Apple event). Considering Tweetbot’s excellent iCloud sync, this strikes me as an omission that will be rectified soon. For one, they don’t sync – you’ll have to recreate each filter from scratch on your other devices. I have some complaints about this first version of filters. I can see how filters will become a popular choice to quickly refine which tweets are shown in a timeline thanks to their easy controls. While that was possible with searches before, using filters is more intuitive and it only takes one tap to activate them and change the tweets displayed in Tweetbot. When I was in San Francisco for WWDC, I used filters extensively to filter my timeline and mentions to specific types of content that let me see what people were saying about iOS 10. ![]() Furthermore, unlike muting a keyword or a user, filters allow you to exclude or include a keyword or tweet type, so you can hide tweets that match a certain keyword or type or only view those tweets, excluding everything else. Unlike mute filters (which, once activated, are applied to the entire app), timeline filters are easier to put together thanks to a creation UI and they can be enabled for individual sections of the app. Tweetbot’s new timeline filters can dynamically filter tweets based on keywords and the following tweet types: After spending a week with filters, though, I can see the value they bring to the app, particularly if you use searches and profile timelines a lot, or if you’ve been looking for ways to quickly exclude or catch up on a topic in your timeline. I didn’t fully grasp the benefit of filters at first – they looked like another way to enable mute filters in any Tweetbot view. With an update launching today on the App Store, Tweetbot is adding the ability to filter timelines – any timeline within the app – by specific types of content.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |