所以我必须在表单中验证名称,一些验证是:
我试图使用这样的正则表达式:
/^(?=.{5,50}$)\p{L}*(?: \p{L}+)*?/;
但是javascript不允许使用unicode表达式,我不能使用插件作为XRegExp,我也试过了:
/^[a-z\u00E0-\u00FC]+$/i
和
/^[A-Za-z-áéíóú]+$/
任何帮助?
感谢您阅读:)
答案 0 :(得分:2)
您可以使用以下正则表达式:
Error:The newly created daemon process has a different context than
expected. Java home is different. Expecting: 'D:\Program
Files\Android\Android Studio\jre' but was: 'C:\Program Files\Java\jdk1.8.0_92'.
Please configure the JDK to match the expected one.
<a href="open.project.structure">Open JDK Settings</a>
参见 regex demo
<强>的JavaScript 强>
[a-z \u00E0-\u00FC]{5,50}
&#13;