如何在文本框中仅允许三个点,所有数字和字母 [英] How to allow only three dots,all numbers and alphabets in a textbox

查看:65
本文介绍了如何在文本框中仅允许三个点,所有数字和字母的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Windows应用程序中使用文本框发送电子邮件...在文本框中输入电子邮件地址时,我只希望在该文本框中输入3个点...允许使用字母和数字.该文本框...,例如:prem@yaoo.co.in.org

Im using text box for email in my windows application...while entering email address in the text box i want to allow only 3 dots in that text box...alphabets and numbers are allowed..please give the validation for that text box... for example:prem@yaoo.co.in.org

推荐答案

使用适当的正则表达式来满足您的要求.顺便说一句,电子邮件地址也可以包含点,例如prem.kumar@ym.co.in.明确考虑因素,并调整正则表达式以适合您的需求.

使用正则表达式的电子邮件地址验证 [
Use proper regex to fulfill your requirement. BTW, email address can also contain dot like prem.kumar@ym.co.in. Make your considerations clear, and tweak the regex to suit your need.

Email Address Validation Using Regular Expression[^]


这篇关于如何在文本框中仅允许三个点,所有数字和字母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆