Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            var ValidFirstChar = EnglishLetterOrHyphen;
            var ValidChars     = EnglishLetterOrHyphenOrDigit & '.' & '-';

            var email = WordEdge +
                        ValidFirstChar +
                        ValidChars[0, 19] +
                        "@" +
                        ValidFirstChar +
                        ValidChars[2, 14] +
                        "." +
                        ValidFirstChar +
                        ValidChars[1, 9] +
                        WordEdge;

            textBox1.Text = email.ToString();

            var vrx = new Verex(email);
            var txt = "My email is [email protected] .";
            var m   = vrx.Match(txt);

            if (m.Success)
            {
                MessageBox.Show(m.Value);
            }
        }