检查文本字段的正则表达式代码正在工作,直到给出“输入” [英] Regex code to check textfield is working until a 'enter' is given
问题描述
我们在检查文本字段时遇到麻烦。我们在这里尝试做的是检查默认文本是否已更改。如果不是这样,那么表单末尾会出现一个警告。
一切正常,直到文本字段包含'return'(回车)在文中。即使默认文本消失,输入也将导致正则表达式代码失败..
这里使用的代码:
^((?!\ b这包含默认文字)。)* $
请告诉我,如果你可以帮我在这里
我尝试过:
几个代码......对不起,我已经没有了。我们还用验证器检查了代码。
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.
推荐答案
如果你能提供帮助请告诉我我在这里
我尝试了什么:
几个代码。 ..对不起,我没有他们了。我们还使用验证器检查了代码。
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.
您已经在检查文本字段的正则表达式代码正在工作,直到给出输入 - 正则表达式讨论区 [ ^ ]。请不要重新发布。
如果您需要帮助,请显示您尝试的代码并解释它导致的问题;我们无法猜测你的尝试。
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.
这篇关于检查文本字段的正则表达式代码正在工作,直到给出“输入”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!