dumb question about the treating an asterisk as an asterisk -- not a wildcard

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

jbonanca
Posts: 31
Joined: Mon Dec 06, 2010 1:49 pm

dumb question about the treating an asterisk as an asterisk -- not a wildcard

Postby jbonanca » Wed Jan 24, 2018 8:37 am

I have a string with elements like:

WALMEX*_MM

Forgive the dumb question, but how do I write a line that will get rid of that asterisk?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11910
Joined: Tue Sep 16, 2008 5:38 pm

Re: dumb question about the treating an asterisk as an asterisk -- not a wildcard

Postby EViews Gareth » Wed Jan 24, 2018 9:25 am

Code: Select all

%a = "WALMEX*_MM"
%b = @replace(%a, "*", "")
Follow us on Twitter @IHSEViews

jbonanca
Posts: 31
Joined: Mon Dec 06, 2010 1:49 pm

Re: dumb question about the treating an asterisk as an asterisk -- not a wildcard

Postby jbonanca » Wed Jan 24, 2018 11:36 am

Thank you Gareth. Now I feel especially idiotic. I thought I had tried something like that to no avail. At the risk of feeling yet more foolish, why is that asterisk not read as a wildcard? Thanks vm again.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11910
Joined: Tue Sep 16, 2008 5:38 pm

Re: dumb question about the treating an asterisk as an asterisk -- not a wildcard

Postby EViews Gareth » Wed Jan 24, 2018 11:57 am

Because @replace doesn't accept wildcards.
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 11 guests