Passing Value to EasyPattern

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

Passing Value to EasyPattern

Post by kpassaur » Tue Apr 20, 2010 9:44 am

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?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Apr 20, 2010 10:42 am

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
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

Thanks

Post by kpassaur » Tue Apr 20, 2010 10:52 am

Thanks - I see what I did.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts