Super Contributor II

Regular Expression on Registration Page



I am looking to make a regular expression that will exclude a certain string from being allowed on our registration page.


The field is a simple text field.

I am using the option IsRegexMatch.


I found out that the field can accept perl regular expressions. I found this:


 Which is a negative lookbehind.


I modified it to match our requirements


 However it only works if the word "fox" is put in by itself.

If you add any other word it is accepted.


This will fail


 This will be excepted

Fox company
fox company
company fox
company Fox


Is there an easier way to doing this?

Or perhaps I having gone completely wrong with my regular expression.

I had tested my regular expression here and it seemed to work okay.


Thank you,



Regular Contributor I

Re: Regular Expression on Registration Page

That's pretty cool - cant you just use a wild card at the end?




What do you reckon? :smileywink:

Super Contributor II

Re: Regular Expression on Registration Page

I thought about that actually, well sort of.


I had tried this combination


 The \w+ at the end is basically like a wild card as defined here.


I never actually considered using just a standard '*'

I will give it a shot and let you know the results!


Thanks for the suggestion.


I tried this


but unfortunately it causes the field to accept everything.


I also tried this


 but unfortunately it causes the field to fail everything.


Super Contributor II

Re: Regular Expression on Registration Page

Oh I actually found one that works I think



 Any combination it appears will be picked up


Fox company
company fox

 All got rejected



 Was accepted


You can extend this to into other patterns



This would match


fox or wolf


The only down side that I found is that it will be rejected if the string exists inside another word


So if we wanted to filter out 'over' and you typed 'overly' the string will get rejected.


For what we need it for though it should work.


credit where credit is due


Thanks guys!



Search Airheads
Showing results for 
Search instead for 
Did you mean: