Hi,
... Not sure if you got this sorted but give this a try.
We use these functions with our banking files, which are complex multi-part names we want to rename to make our life easier.
Unfortunately in your example * is also used in defining the Regex so that is making your life more difficult.
If you simply escape the * that should give you the answer you are looking for:
(The * Between Groups is escaped with the \).
{REGEX(MatchGetGroup|11111*22222*33333*44444*55555*66666|(.*)\*(.*)\*(.*)\*(.*)\*(.*)\*(.*)|5)}
I would suggest if you get into this, that you use and set a variable using the regular expression as a task step, as an aid to debugging your Regex (keep running that task with the regex until you get the answer you are looking for) and then use the variable result in the downstream tasks.
If the REGEX gets too complicated (its a function after all) you may find kicking out to Powershell and using the regex there to be a more maintainable . . . . and documented way to handle this.
As an aside, if you can I would steer away from * as a delimiter if you can . . . . For REGEX and WinDoze reasons !
Good Luck !
Edited by user
2013-10-16T01:41:20Z
|
Reason: Exactly match the REGEX to the Data Presented in the Question
KJDavie attached the following image(s):