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.
  • See how to design an experiment, explore factor-response relationships, assess tradeoffs, and ID best settings. Register for Sep. 11 Mastering JMP.

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 ACCEPTED SOLUTION

Accepted Solutions
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

View solution in original post

2 REPLIES 2
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
tsl
tsl
Level III

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

Thanks ! I can't believe I've been using JMP for ~ 2 decades and never realized Eval Insert() had an optional argument to specify the delimiter ! Sometimes it pays to read the manual :)

Recommended Articles