-
Regular Expression
Can anyone help with the correct syntax for a reg expression to match just one word only?
Im looking to use an alternative to Captcha. A "what colour is the sky?" type question where only one one-word answer will be accepted for form submission.
i.e. "blue" would be the only correct answer, accepted in upper and lower case
Yours sincerely suffering from spam,
Thank You ;)
-
Re: Regular Expression
The opposite of black? Or conversely, the opposite of white.
The opposite of day? The opposite of night?
-
Re: Regular Expression
I have had success with "what is "1+1"- two.
-
Re: Regular Expression
From google's site the following example is given for hell (it won't return results for part words eg hello, shell which is what I want):
(\W|^)hell(\W|$)
but the syntax seems to be wrong, any suggestions?
-
Re: Regular Expression
I believe it is language specific. What are you using? PHP, ASP, ASP.NET, Javascript?
This site lets you enter an expression, set flags (e.g. case insensitivity), and when you click submit, it tests the expression with the option to display the proper syntax for selected languages.
http://www.myregextester.com/
-
Re: Regular Expression
Something like \b[Bl][Ll][Uu][Ee]\b
Acorn