For those of you who like to manipulate data in the expression editor, there are a few things that can be done:
1. You can build a C# or VB.NET assembly that will take a string and manipulate it returning the correctly formatted string
2. You can use xpath.

A clients request is that we parse from the filename, the date that is embedded in the filename.

The first thing I did was extract the filename into a variable called FileName:
FileName=IncomingMsg(File.ReceivedFileName);
FileName=System.IO.Path.GetFileName(FileName);

Then I needed to pull from position 26-31 the date into the variable MessageDate:
MessageDate=xpath(”substring(’”+FileName+”’,26,8)”);
(One gotcha is that you have to put a single quote ’ right after the open paranthese and then a double quote ” and then concatonate the variable and then do the reverse to close it out. The other gotcha is that if you are parsing out a string that has a single tick ( ’ ), you will have to use the Regex replace and replace it with another variable, substring the variable, and then replace the single tick back.)

This adds quite a bit more functionality to the Expression Editor than what is currently available.

The web page that I use as a xpath reference is this page.