Stephen A. Fuqua (SAF) is a Bahá'í, software developer, and conservation and interfaith advocate in the DFW area of Texas.

Down With Comment Spam

November 29, 2007

Frequent blog readers will easily recognize comment spam: unrelated or gibberish comments posted to entries. I've been getting a ton of them with phrases like "cool site. Thanks!". In the old Movable Type I knew how to filter these out. With the new I wasn't sure, and have been too lazy to figure out the proper regular expression syntax. Thankfully someone came to my rescue:

/(cool|excellent|good|nice)(\s)+site\.(\s)+(thank(\s)+you|thanks)/i
.

1 Comment

Glad you enjoyed it. I hope it helps. :)