I am trying to remove duplicates with an EasyPattern. I will be having a file name that uses a separator. The user can select the separator so it will be a variable. I do not want more than one separator in a row. So it is similar to removing double spaces only it is double charactors.
This works:
Let>filename=asdfa___sdf_DFSD__123
Let>%FS%=_
Let>pattern=[oneOrMore '_']
RegEx>pattern,filename,1,matches,num,1,%FS%,text
MessageModal>text
However, when I pass it as a variable it does not
Let>filename=asdfa___sdf_DFSD__123
Let>%FS%=_
Let>pattern=[oneOrMore '%FS%']
RegEx>pattern,filename,1,matches,num,1,%FS%,text
MessageModal>text
Any ideas as to what I am doing wrong?
Passing Value to EasyPattern
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
It should be:
Let>filename=asdfa___sdf_DFSD__123
Let>FS=_
Let>pattern=[oneOrMore '%FS%']
RegEx>pattern,filename,1,matches,num,1,%FS%,text
MessageModal>text
Let>filename=asdfa___sdf_DFSD__123
Let>FS=_
Let>pattern=[oneOrMore '%FS%']
RegEx>pattern,filename,1,matches,num,1,%FS%,text
MessageModal>text
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?