仅在 VBScript 中具有特定域的电子邮件的正则表达式 [英] Regular Expression for the email with specific domain only in VBScript

查看:23
本文介绍了仅在 VBScript 中具有特定域的电子邮件的正则表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮我使用 VBScript 中特定域的正则表达式吗?

Can someone help me with regular expression for the specific domain in VBScript please?

我用 JavaScript 创建了一个,但根据现有代码的结构,VBScript 是更好的选择.

I created one in JavaScript but As per the structure of the existing code, VBScript would be better option.

我为 JavaScript 电子邮件验证创建的正则表达式是

Regex I created for the JavaScript email validation is

^[A-Za-z0-9._%+-]+@testdomain.com$

用于 VBScript 中 VBScript 电子邮件验证的正则表达式

Regex for the VBScript email Validation in VBScript

Regex.IsMatch(txtField.txt, "^\d{10}$")

提前致谢.

推荐答案

试试这个.正则表达式将保持不变.

Try this out. The Regex will remain the same.

Regex.IsMatch(txtField.txt, "^[A-Za-z0-9._%+-]+@testdomain.com$")

这篇关于仅在 VBScript 中具有特定域的电子邮件的正则表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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