You are viewing limited content. For full access, please sign in.

Question

Question

Ensuring field contains a string of text

asked on May 16, 2023

I would like to set up a field that would check to see if the text inputted contains the following text:

 

@sampledomain.com

 

If the field does not contain that text, the form should not allow you to save the form, or continue.

 

How would I go about setting this up?

 

Thanks!

 

Sincerely,

Herb Cruz

0 0

Answer

SELECTED ANSWER
replied on May 16, 2023

Regex:  @\w+\.com

@ = Ampersand as a literal

\w+ Any number of alphanumeric characters

\. = period

com = com as a literal

 

2 0
replied on May 16, 2023

Ah I see, you wanted anything in front of "sampledomain.com" 

I'm glad you could make that work. 

I use Expresso to sort out RegExs, www.ultrapico.com, very useful. Thanks for the thumbs up!

0 0

Replies

replied on May 16, 2023 Show version history

This was most helpful!

After fooling around with the Regular expression formula, I settled on the following:

\w+\@sampledomain.com

And it worked!

Thank you for your quick and valued response, Bill.

Herb

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.