Click here to Skip to main content
15,885,537 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi, we are having troubles whit checking a textfield. What we try to do here is to check if the default text has changed. If that is not the case, then a warning will appear at the end of the form.

Everything is working fine until a textfield contains a 'return' (enter) in the text. Even when the default text is gone, the enter will be responsible for the regex-code to fail..

Here the code i have used:

^((?!\bThis contains the default text).)*$

Pleas let me know if you can help me out here

What I have tried:

several codes... Sorry, i don't have them anymore. We also checked the code with a validator.
Posted
Updated 15-Mar-18 6:20am

1 solution

You already posted this at Regex code to check textfield is working until a 'enter' is given - Regular Expressions Discussion Boards[^]. Please do not repost.

And if you want help then please show the code you have tried and explain what problem it causes; we cannot guess what you have tried.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900