I am try to capture the subject in email with regular expression but not working. Help me please
this is the text that want to capture:
Action ‘FarmaERP-OnEC2-Camaleon’ succeeded
and my regular expression is:
(Action\s(.+)\ssucceeded)
this is my configuration:
for the Subject
messageFiltered = messages.Where(Function(m) m.Subject.ToString.Contains( PatternSubject ) ).ToArray
PatternSubject = “(Action\s(.+)\ssucceeded)”
for the body:
S_Account = System.Text.RegularExpressions.Regex.Match(String.Join(vblf,msg.Body.ToString.Split({System.Environment.NewLine},System.StringSplitOptions.RemoveEmptyEntries)),PatternAccount).Value.Trim
PatternAccount = “(Account:\s(.+))”