cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to use Accelerated Life Testing (ALT) to evaluate reliability. Register for June 5 webinar, 2pm US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
chandankishor66
Level III

Find few letter and replace whole word

Hello JMP community,

 

I am looking for your help to write a script who can find "PF"  OR "F" from column 1 and put "prefermentor: or "fermentor: name in column 2.

chandankishor66_0-1663916314832.png

Regards,

Chandan

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Find few letter and replace whole word

With the provided information something like this should work and it is quite simple (create new formula column with it):

If(Ends With(:Column1, "PF"),
	"prefermentor",
Ends With(:Column1, "F"),
	"fermentor"
,
	""
);
-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Find few letter and replace whole word

With the provided information something like this should work and it is quite simple (create new formula column with it):

If(Ends With(:Column1, "PF"),
	"prefermentor",
Ends With(:Column1, "F"),
	"fermentor"
,
	""
);
-Jarmo
chandankishor66
Level III

Re: Find few letter and replace whole word

Thanks Jthi

Recommended Articles