Title: Comment spam &#8211; regex?
Last modified: August 20, 2016

---

# Comment spam – regex?

 *  [utnalove](https://wordpress.org/support/users/utnalove/)
 * (@utnalove)
 * [15 years ago](https://wordpress.org/support/topic/comment-spam-regex/)
 * Hello, if I want to moderate or mark as spam a phrase and ONLY this phrase:
 * **hello world**
 * but not the single words, only when they appear together… what should I write
   in Settings → Discussion > Comment Moderation.?

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years ago](https://wordpress.org/support/topic/comment-spam-regex/#post-2120336)
 * [RegExp Tester](http://www.regexlib.com/%28A%28VxhaLXfp6Gq1Uz8ZljdpBOmzu2BzQRXecE0Qr2C6eRKWEFdEof0g4T7dgZngpWJfynZA4kox8BjuhXtSEVLpKARPgJu6tGvvvuZiO66Bg8H77iKEDpEUTC3iliqaUkJzOW0ktW-do6NP8dWswzraQdRfbEFUQ58YKYFEZl6qlSU_7OXVmMiDkUHJ3QQ33bfq0%29%29/RETester.aspx)
 *  Thread Starter [utnalove](https://wordpress.org/support/users/utnalove/)
 * (@utnalove)
 * [15 years ago](https://wordpress.org/support/topic/comment-spam-regex/#post-2120341)
 * which engine I have to choose?
    what options?
 * how to use that for WP?
 *  Thread Starter [utnalove](https://wordpress.org/support/users/utnalove/)
 * (@utnalove)
 * [15 years ago](https://wordpress.org/support/topic/comment-spam-regex/#post-2120370)
 * I think I tried everything on that site… but still I cannot find a way to block
   the:
 * **hello world**
 *  Thread Starter [utnalove](https://wordpress.org/support/users/utnalove/)
 * (@utnalove)
 * [15 years ago](https://wordpress.org/support/topic/comment-spam-regex/#post-2120485)
 * please help…. should I write it
 * “hello world”
    (hello world) … or how?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years ago](https://wordpress.org/support/topic/comment-spam-regex/#post-2120525)
 * Try `\shello\sworld\s`
 *  Thread Starter [utnalove](https://wordpress.org/support/users/utnalove/)
 * (@utnalove)
 * [15 years ago](https://wordpress.org/support/topic/comment-spam-regex/#post-2120531)
 * I added `\shello\sworld\s` to the wp-admin/options-discussion.php in order to
   have those comments in the moderation queue… however as you can see I made a 
   test and the comment was automatically published without passing in the moderation
   queue:
 * [http://glamourina.pl/troche-koloru/#comment-495](http://glamourina.pl/troche-koloru/#comment-495)
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years ago](https://wordpress.org/support/topic/comment-spam-regex/#post-2120584)
 * Looking at Settings -> Discussion I’m not convinced that you can use a regexp.
 *  Thread Starter [utnalove](https://wordpress.org/support/users/utnalove/)
 * (@utnalove)
 * [15 years ago](https://wordpress.org/support/topic/comment-spam-regex/#post-2120586)
 * hmm…. here I read
 * > “Moderation keys can include Spam Words, swear words, IP addresses, and Regular
   > Expressions.”
 * [http://codex.wordpress.org/Comment_Moderation](http://codex.wordpress.org/Comment_Moderation)

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Comment spam – regex?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 2 participants
 * Last reply from: [utnalove](https://wordpress.org/support/users/utnalove/)
 * Last activity: [15 years ago](https://wordpress.org/support/topic/comment-spam-regex/#post-2120586)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
