Is it possible to use wildcard-characters/Regex in MailFolder


#1

Hi All,

Is there a way to use wildcard-characters/Regex for MailFolder field in “Move Exchange Mail Message” activity.

In my case problem is with the mail folders in the shared mailbox. Sometimes the mail folder may be “Inbox\2015-Test” or “Inbox\test-2016” or “Inbox\test-2017-ab”. Here the naming convention of the folder is different but all are related to the same project(Test)

I’m looking for something like using wildcard-characters/regex say, "Inbox*test*

Could please help with an idea.


#2

Use This Regular Expresion It Will work for All The given condition

\Inbox\((\d{4}-\Test)|(test-\d{4}$)|(test-\d{4}-\w+))


#3

@Himanshu.joshi It’s not working. It is moving mailmessage to Inbox rather than 2015-Test.


#4

@vinnu.vanga

Use this

\Inbox\\((\d{4}-\Test)|(test-\d{4}$)|(test-\d{4}-\w+))

This Time It Work Properly


#5

@Himanshu.joshi Still the same behavior. move%20exchange%20mail

Above activity is not moving mailmessage to 2015-Test folder instead it is moving to Inbox.


#6

@vinnu.vanga This is Rgex Pattern You Use It wrong way.

System.Text.RegularExpressions.Regex.Match(YourMailVariable,"\Inbox\((\d{4}-\Test)|(test-\d{4}$)|(test-\d{4}-\w+))").ToString

Updated