cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
lala
Level VIII

How can you do this faster with JSL?

Require these characters to be replaced with the result in the diagram

<a href="/shiju/chuntian/">A11</a></li><li><a href="/shiju/chongyangjie/">C22</a></li><li><a href="/shiju/laoshi/">D3</a></li><li><a href="/shiju/juhua/">B0</a></li><li><a href="/shiju/libie/">B1</a>


Explanation: This kind of data is very large.

2024-03-25_19-50-32.png


I replaced slower with the following code

tx=Substitute(tx,"</a></li><li><a href=\!"/shiju/","\!N","/\!">","\!t");Set Clipboard( tx );

Thanks!

3 REPLIES 3
jthi
Super User

Re: How can you do this faster with JSL?

What you want to do faster and what do you consider fast? The substitute part takes less than 10 microseconds

Names Default To Here(1);

tx = "\[<a href="/shiju/chuntian/">A11</a></li><li><a href="/shiju/chongyangjie/">C22</a></li><li><a href="/shiju/laoshi/">D3</a></li><li><a href="/shiju/juhua/">B0</a></li><li><a href="/shiju/libie/">B1</a>]\";
s = HP Time();
Substitute(tx, "</a></li><li><a href=\!"/shiju/", "\!N", "/\!">", "\!t");
e = HP Time();

Show(e-s);
-Jarmo
lala
Level VIII

Re: How can you do this faster with JSL?

Thanks Experts!

 

What if the number of rows after replacement reaches 100 million?

Is it faster to replace with regular?

 

I find that the substitutions written this way are not as fast as the regular substitutions of the text editing software EmEditor.

jthi
Super User

Re: How can you do this faster with JSL?

JMP isn't specialized text editor software so maybe the functions haven't been optimized for that use (Substitute does a lot more than just replace text). Maybe you could call EmEditor through Run Program if it is fast enough for you (I still have no idea what is considered fast in this case or what is really the case).

-Jarmo