How do I create a regex news filter that can look for a single word?

ajfudge

I want to create a regex news filter with the following rules:

1. Create a filter for feed titles that has "apple" in it.

2. Just the word "apple", no any other close-match like "applet", etc.

3. "apple" can be found at the start or end of the title.

 

Thank you smiley

Dan Bollinger
I'm just learning this now,

I'm just learning this now, too.  See this page.  http://en.wikipedia.org/wiki/Regular_expression

Sheldon
1: .* apple .* means it

1) .* apple .* means it contains the word " apple "
2) apple .* or ^apple .* means it starts with the word the word "apple "
3) .* apple$ means it ends with the word the word " apple"

ajfudge
Thank yo, Sheldon. That's

Thank yo, Sheldon. That's very helpful.  Wink

ajfudge
Follow up question:

Follow up question:

How do I limit the regular expression so that it doesn;t include partial matches like  "apples", "applet", "applets"?

I just want the regex to filter exact matches, i.e. "apple" only.

Sheldon
I think I don't understand

I think I don't understand your approach. What are you trying to do?
The regex ^apple$ would match "apple" but there is no need to use regex in this case.
If you just want to test a field entry to match "apple" you can just use the "is"- option in QuiteRSS..

ajfudge
Hi Sheldon,

Hi Sheldon,

 

What I'm trying to do is to create a filter for exact matches, which is why I'm turning to regex.

Let's say my keyword is "mail", I want titles that contain exactly the word "mail" to be filtered.

Now this keyword may also result in partial matches like email, mailer, mailman, doom ailment, wamai litu (notice the red bold letters?)

I want the regex to not include those partial matches. I just want the regex to exactly match the word "mail" and nothing else. How do I do that?

 

 

 

Sheldon
So you need to surround the

So you need to surround the keyword with blanks like " mail ". Look at my examples (1-3) above. Did you miss the blanks?

ajfudge
Sheldon,

Sheldon,

yes, I failed to notice the spaces. Thank you for clarifying. They're working as expected now. Smile