Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 467541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:35:31+00:00 2026-05-12T23:35:31+00:00

There’s a comment form where I’d want people to be able to write in

  • 0

There’s a comment form where I’d want people to be able to write in foreign languages too.
But, for example, my spam-filtering mechanism would block something naiive as the word “été” simply because it has no vowels in it (english vowels that is).

My question is, when using regex for detecting vowels like:

$pattern = '/[aeiou]/';

I cannot simply write

$pattern = '/[aeiouéáíúó...]/';

and the server would interpret that well. How can I do this so that it IS interpreted well?

For non-latin alphabets like russian and hebrew, is there a method that I can detect which language the content belongs to and perform an appropriate spam-filtering mechanism?

The purpose of the whole spam-filtering is to block anything like: “gjkdkgahg” or “ttt”, it’s a publicly visible page.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T23:35:31+00:00Added an answer on May 12, 2026 at 11:35 pm
    $pattern = '/[aeiouéáíúó]/';
    

    Use the u modifier to get Unicode-aware regex and that should work, assuming you’re working with UTF-8 strings throughout your app, which you should be really.

    For non-latin alphabets like russian and hebrew, is there a method that I can detect which language the content belongs to and perform an appropriate spam-filtering mechanism?

    Basic Russian is found in Unicode range U+0400–U+04FF; vowels are аэыуояеёюи. Hebrew is in range U+0590–U+05FF and doesn’t use vowels in the same way. I don’t think detecting vowels is terribly useful… you might have more luck with a simple dictionary covering many languages, as long as you stick to languages that have clear word boundaries. Not much use for Chinese.

    I don’t think that this sort of thing is a good anti-spam mechanism at all. It’s as likely to false-positive as it is to spot spam, which is after all very often proper words. Varying spoiler fields (CSS-hidden inputs that must be left blank but won’t be by bots) and one-use or limited-time submission tokens are much more likely to be effective.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There's a Rails 3.2.3 web application which doesn't use any database. But in spite
There are nice SO question and answers about this issue, but these options didn't
There are several shading languages available today like GLSL, HLSL, CG, which one to
There are a TextField , a ListBox and a TextArea inside my Form .
There is a div (form) which opens on the click of a button. There
There are 2 websites. Mine and a clients. The client needs to be able
There are a lot of Jquery plugins and libraries. and sometimes I want to
There have been multiple questions regarding this topic but I have never really settled
There are some stdlib functions that throw errors on invalid input. For example: Prelude>
There is my code that I want to alert test once when mousemove ,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.