XF 1.3 Spam Management - Regular Expression - No URLs In Posts

ProCom

Well-known member
I was thinking I'd like to limit links in the first few posts from new members using "Spam Phrases", specifically: "www" and "http".

I thought maybe I couldn't just put them in like that and I'd need to use wildcards and maybe even the regular expression... but have questions:
  1. What is the best way to use spam phrases to moderate first posts with links?
  2. What are some examples of regular expressions and how are they used in spam phrases? (the example "/test/i" isn't too clear to me)
Thanks!
 
1) Just enter those strings directly, one per line as in the instructions. You don't need a regex if you are matching exact strings.

2) If you want to match "bikes" and "bike" you could use a regex to make the "s" optional:

/bikes?/i

It's a dumb example, but it's late and my brain is sleepy.

Regex has logic to match patterns and perhaps consolidate multiple words into one pattern.
 
Thanks Jake!

So, to clarify: I can just put in www and http and it will catch urls posted without doing any wildcards (*) or anything?

Will it catch the ones that are embedded, like this: test
 
Top Bottom