How to delete a substring

For questions regarding programming in the EViews programming language.

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

piotrw
Posts: 7
Joined: Fri Mar 27, 2015 2:22 am

How to delete a substring

Postby piotrw » Tue Jun 30, 2015 9:19 am

Hi, EViews 8.1, I would like to delete a substring from a string at specified position. If I use

%coefSigns = @wdrop(%coefSigns, @word(%coefSigns, !word))

it works fine but if there are the same names in coefSigns, all of them are deleted. I need a solution as follows:

%coefSigns = @...(%coefSigns, !position)

to iteratively get rid of a character from a specified position and not based od "pattern_list".

best regards

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

Re: How to delete a substring

Postby EViews Gareth » Tue Jun 30, 2015 10:00 am

I think you'll have to use a combination of @left and @mid to join together the parts not including the character you want.

piotrw
Posts: 7
Joined: Fri Mar 27, 2015 2:22 am

Re: How to delete a substring

Postby piotrw » Tue Jun 30, 2015 10:02 am

Thanks for reply


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest