cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
635
Views
0
Helpful
1
Replies

Extracting part of a subject title

Paul Caley
Level 1
Level 1

Hello,

I'm looking to extract part of a subject title sandwiched between two special characters ([ & ]) and use that to create a new subject title in a new e-mail.

So for example, if the subject title of the e-mail says "[This is the main subject title] but not this part", I want to extract the bit between the two brackets and create a new subject title in a new e-mail which in this case would say "This is the main subject title". Obviously this text can vary.

Can this be done by use of filters within a Cisco ESA? Would appreciate any pointers how to extract it if it can be done.

 

1 Reply 1

You can use either a content filter or a message filter.

Search using a regex like this one...   (?<=\[)[^]]+(?=\])

I got that from here:http://stackoverflow.com/questions/2403122/regular-expression-to-extract-text-between-square-brackets

You may have to fiddle with it...

Then for the action, set the subject to "$MatchedContent" (look at the online help for the content or message filters)