We Now Support RegEx Matches – The Return of Grep Reddit

The original name for “Notifier for Reddit” was “Grep Reddit”

It’s fitting that we have now released regular expressions support because the original name for Notifier for Reddit was actually Grep Reddit.

It was named after the legendary linux command line tool grep (general regular expression parser). The original idea was to provide the functionality that grep provides for a file but for reddit.

I eventually changed the name once I got feedback that most users would not know what grep is.

Video Tutorial:

Written Tutorial:

We have released an exciting and powerful new feature for Notifier for Reddit and that is support for RegEx or Regular Expression matches.

Regular Expressions are a concise language for defining pattern matching algorithms. Many of our more technically inclined users have requested this feature and we will hope it will allow them to more effectively match on some more advanced matching. So let’s get started with an example of a Regular Expression.

One really great tool for testing your Regular Expressions is regex101.com. When you go to regex101.com, you’re going to want to make sure that you select Python as the Flavor of Regular Expression language as that’s the Regular Expression engine that we’re using. Notice I have this text that I have already pasted in here and also notice that in this text, we have the word Reddit and then track occurring right here.

regex101.com home page where you can navigate to Flavor and select Python to start with the RegEx match

What I want to do is, say I want to be notified when the words Reddit and track occur within the same line, I can use Regular Expressions to do that matching. So I’m going to go to the Regular Expression input box and going to type in the word Reddit. As you can see it has found one match here.

regex101.com home page with a text that have already pasted in and in Regular Expression box, we have the word Reddit which track the word Reddit under the Text String

Now I also want to match only if the word track occurs within the same line. So with Regular Expressions, one key character that you use to define a matching algorithm is the dot (.) character. That stands for any character essentially so that matches any possible character. And one great thing about this regex101 tool is that it shows you when you highlight over things exactly what that character means in a regular expression. Another key character is the plus (+) symbol which means match any number of times. So I’m going to edit that in and as you can see it’s going all the way to the end of the string because we’re saying, “Hey, find this word Reddit and then any number of characters after it.

regex101.com home page showing how the plus (+) symbol is used to define a matching algorithm that means match any number of times as shown in the highlighted text when Reddit.+ was entered

Now we want to narrow it down further so I’m going to type in the word track and it’s going to match up to the word track.

regex101.com home page showing how to modify the use plus (+) symbol to narrow down the search as shown in the highlighted text when Reddit.+track was entered

What we can do now is used this exact same regular expression that we’ve created and we can input that into Notifier for Reddit to find matches that meet these criteria. So I am going to copy this Regular Expression, I’m going to go to Notifier for Reddit and I will add a Searcher.

  • Match Type: For normal Notifier for Reddit String Match based search, I’m going to go regex.
  • Regex: I’m going to paste Reddit.+track in.
  • Posts/Comments: For posts and comments, I want both.
  • Notification Interval: For the notification interval, I select instant.
  • Include/Exclude Subreddit?: I don’t want to include or exclude Subreddit at this time.
Add Searcher page on Notifier for Reddit dashboard showing how to add a Searcher using the RegEx 'Reddit.+track' previously created

I will hit Add and let’s go back to regex101.com and copy this string of text that we had. We are going to go to Reddit now, to the text Subreddit that we have set up before and we are going to make a new post.

A post creator page for a previously created test subreddit to show how to make a post and comment using the same string of text already created

Let’s go back to our email and what we are expecting now is for Notifier for Reddit to send us a match email pretty soon and there it is, Your Searcher for “Reddit.+track” found a new Post.

This is to show the inbox where the notification email will appear when a match is found whenever a post or comment is made

I’m going to scroll down and there is the match and we can instantly click on View on Reddit and respond if this was something we’re interested in and needed to respond on it.

This shows the email where we can instantly click on View on Reddit and respond to if this was something we're interested in

So that should get you started with using Regular Expressions in Notifier for Reddit. Feel free to reach out to us if you have any questions and especially if you have any feature suggestions that will help you narrow down and get to what you are actually searching Reddit for.

Get Notified when keywords you care about are mentioned on Reddit, Twitter and so much more!

How Notifier helps you become the Hero!