Quantcast
Viewing all articles
Browse latest Browse all 224

Regex code to check textfield is working until a 'enter' is given

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.

Viewing all articles
Browse latest Browse all 224

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>