cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • JMP multivariate capabilities let you understand relationships between multiple variables simultaneously. See how. Friday, Aug. 14, 2 pm US ET.

Discussions

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

How can I make Eval Insert ignore the ^ character ?

I have a situation where I need to build a string that will be passed to an external program. I need to use Eval Insert in building the string but the string also needs to contain a RegEx which includes the ^ character.

I am struggling to get JMP ( Version 19.1.4) to ignore that character in the Eval Insert call. Here is a sample :

Str_To_Eval = "Insert_Str";
str = "This is a String containing ^Str_To_Eval^ and it also contains this regex : ^(?!.*_).*";
eval insert(str)

This fails with the error :

Unexpected "?". Perhaps there is a missing ")".
Line 1 Column 37: (?!.*_).*►

Prefixing the ^ character with \! does not help. Neither does wrapping it in \[ ..]\

I can solve it like this :

Str_To_Eval = "Insert_Str";
RegExFragment = "^";
str = "This is a String containing ^Str_To_Eval^ and it also contains this regex : ^RegExFragment^(?!.*_).*";
eval insert(str);

which gives the output I want.

I was curious if there's any other way to escape a ^ character so that Eval Insert() would ignore it ?

 

1 REPLY 1
jthi
Super User

Re: How can I make Eval Insert ignore the ^ character ?

Use different character than ^. I usually use ¤.

Names Default To Here(1);
Eval Insert("Today is ¤As Date(Today())¤", "¤");

Eval Insert(string, <startDel>, <endDel>, < <<Use Locale(1) >) 

jthi_0-1786556100491.png

 

-Jarmo

Recommended Articles