Highlighted
Super Contributor.
Super Contributor.
963 views

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)

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Regex

Jump to solution

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

View solution in original post

0 Likes
1 Reply
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Regex

Jump to solution

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

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.