Regex

I'm trying to emails validation so

01 wValido condition-value.

......

move "mmsis@mmsis.com.br" to Lnk-Processo2

declare strModel as type System.Text.RegularExpressions.Regex = new System.Text.RegularExpressions.Regex("/^[a-zA-Z0-9.!#$%&'* /=?^_`{|}~-] @[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/")

set wValido to strModel::IsMatch(Lnk-Processo2)


But I can not, to do it.
Thank you
Translated by Google

Eu estou tentando fazer a validação de e-mails assim

01 wValido condition-value.

.....

move "mmsis@mmsis.com.br" to Lnk-Processo2

declare strModel as type System.Text.RegularExpressions.Regex = new System.Text.RegularExpressions.Regex("/^[a-zA-Z0-9.!#$%&'* /=?^_`{|}~-] @[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/")

set wValido to strModel::IsMatch(Lnk-Processo2)

Mas não estou conseguindo, com faço isso.
Obrigado

move "mmsis@mmsis.com.br" to Lnk-Processo2

declare strModel as type System.Text.RegularExpressions.Regex =

new System.Text.RegularExpressions.Regex("/^[a-zA-Z0-9.!#$%&'* /=?^_`{|}~-] @[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/")

set wValido to strModel::IsMatch(Lnk-Processo2)

  • Verified Answer

    Try the following:

          working-storage section.
          01 wValido condition-value.
          01 Lnk-Processo2 string.
          procedure division.

             move "mmsis@mmsis.com.br" to Lnk-Processo2
             set wValido to type Regex::IsMatch(Lnk-Processo2,
                   "^(?("")("". ?(?<!\\)""@)|(([0-9a-z]((\.(?!\.))|[-!#\$%&'\*\ /=\?\^`\{\}\|~\w])*)(?<=[0-9a-z])@))" &
                   "(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-z][-\w]*[0-9a-z]*\.) [a-z0-9][\-a-z0-9]{0,22}[a-z0-9]))$",
                   type RegexOptions::IgnoreCase)

             display wValido