如何在coldfusion中允许电子邮件正则表达式中的下划线

时间:2018-06-14 07:54:04

标签: regex coldfusion

您好我正在使用正则表达式来验证电子邮件,但是当我尝试在电子邮件地址中使用下划线而不是给我错误时。

以下是我正在使用的regx。

^ [A-ZA-Z0-9 - '+〜] +([A-ZA-Z0-9 - ' +〜] +)* @([A-ZA-Z_0-9 - ] +。 )+ [A-ZA-Z] {2,10} $

#1  Set Credentials Button
$Set_Credential = New-Object System.Windows.Forms.Button
$Set_Credential.Top = "5"
$Set_Credential.Left = "5"
$Set_Credential.Anchor = "Left,Top"
$Set_Credential.Text = 'Set Credentials'
$Set_Credential.add_Click({
$UserCredential = Get-Credential
})
$Exchange_Manager.Controls.Add($Set_Credential)

#3  Connect to Exchange Online
$Exchange_Connect = New-Object System.Windows.Forms.Button
$Exchange_Connect.Top = "5"
$Exchange_Connect.Left = "150"
$Exchange_Connect.Anchor ="Left,Top"
$Exchange_Connect.Text = 'Connect' 
$Exchange_Connect.add_Click({
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential "$UserCredential" -Authentication Basic -AllowRedirection
Import-PSSession $Session
})
$Exchange_Manager.Controls.Add($Exchange_Connect)

任何人都可以告诉我应该使用哪个regx?

0 个答案:

没有答案