How To Strip @ Symbol From Var

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
NickD
Pro Scripter
Posts: 58
Joined: Fri Sep 23, 2016 2:17 pm

How To Strip @ Symbol From Var

Post by NickD » Thu Jun 15, 2017 3:05 pm

Hi Guys,

I have a list of vars saved in a .ini, the vars all begin with "@":

[Myvarlist]
1=@apples
2=@oranges
3=@banannas


The script calls var 1, on loop one, var 2 on loop 2 ect, and they are already used in my script for one purpose, which requires the @ symbol, but I need to use them again later in the script.

For the second use I need to clone the current value to another var, then remove the preceeding @ symbol.

Can anyone tell me how to do this?

Thanks,
Nick.

NickD
Pro Scripter
Posts: 58
Joined: Fri Sep 23, 2016 2:17 pm

Re: How To Strip @ Symbol From Var

Post by NickD » Thu Jun 15, 2017 4:23 pm

Figured it out thanks to a post Marcus made:

Let>NewHandle=%OrigiVar%
Let>trimmatch=@
RegEx>trimmatch,NewHandle,0,matches,numMatches,1,,NewVar

MessageModal>%NewVar%

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Re: How To Strip @ Symbol From Var

Post by CyberCitizen » Tue Jun 20, 2017 1:14 pm

StringReplace?
FIREFIGHTER

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