Can implement this substitution with an operation with a regex?For example, this file is a txt file.TAB spacing:
Column 2 contains, column 2 contains
The maximum number of rows is 5
Can you use regular substitution to replace rows with less than 5 such symbols to complete the cell with a total of 5 similar symbols?
Make up as shown in the figure.

Thanks Experts!
Automation and ScriptingWindowsRe: Can implement this substitution with an operation with a regular?Of course, for ease of handling, the contents of column 1 can also be added according to this rule.
Re: Can implement this substitution with an operation with a regular?I'm not really sure what we are trying to implement here based on your text and example provided. Could you expand on it a bit?
Re: Can implement this substitution with an operation with a regular?A B C
00001 744811604804487748 1
00002 744811604411447740~744811607410407768 1▲1
00003 744811607000017746~744811607407400440~744811607611467718~744811600601460016 1▲1▲1▲1
00004 744811606810447747 1
00005 744811606400167710~744811606610607767~744811608807400040~744811401407170047 1▲1▲1▲1
00006 744811607006017776~744811606014617747~744811600606400074 1▲1▲1
00007 744811607114067714~744811607406147747~744811607704147760~744811607710174146~744811600014600011 1▲1▲1▲1▲1
00008 744811604810187746~744811606706407717~744811606607400107 1▲1▲1
00009 744811608814480014~744811608704464148~744811401101140018~744811401607480040~744811401714140017 1▲1▲1▲1▲1
00010 744811606607177767~744811606707470064~744811608610440011~711741608004176007~744811401606180041~744811401704470014 1▲1▲1▲1▲1▲1
00011 744811607401167716~744811607408417748~711047607710460644~744811607711077714 1▲1▲1▲1
00012 460144607710400044~744811607711077716~744811400601440046~744811401104410044 1▲1▲1▲1
00013 744811607814617747~410144608807046447~744811608110140017~744811400807170010 1▲1▲1▲1
00014 744811607807117717~744811607806117747~744811608610400060~744811608804087740~744811400806070014 1▲1▲1▲1▲1

Re: Can implement this substitution with an operation with a regular?Are we trying to add more ▲ to end of last column if there is less than five of them?
Re: Can implement this substitution with an operation with a regular?Yes, of course column 2 is treated by the same rules.
For convenience, you can first replace ~ with ▲
Thanks!
txt="……";
tx=Substitute(txt,"~","▲");ccoyy<BR />
Re: Can implement this substitution with an operation with a regular?Forcing yourself to use regex is in my opinion a bad idea. In this case you could for example loop line by line, replace ~ and triangles with "" on columns two and three, check how many were replaced and then add them to the end of correct "columns".
Re: Can implement this substitution with an operation with a regular?It seems that python's way of handling memory arrays is flexible and simple

Re: Can implement this substitution with an operation with a regular?Is there a reason why you couldn't do exactly (or almost) same thing in JSL?
Re: Can implement this substitution with an operation with a regular?Re: Can implement this substitution with an operation with a regular?Names Default To Here(1);
str = "\[A B C
00001 744811604804487748 1
00002 744811604411447740~744811607410407768 1▲1
00003 744811607000017746~744811607407400440~744811607611467718~744811600601460016 1▲1▲1▲1
00004 744811606810447747 1
00005 744811606400167710~744811606610607767~744811608807400040~744811401407170047 1▲1▲1▲1
00006 744811607006017776~744811606014617747~744811600606400074 1▲1▲1
00007 744811607114067714~744811607406147747~744811607704147760~744811607710174146~744811600014600011 1▲1▲1▲1▲1
00008 744811604810187746~744811606706407717~744811606607400107 1▲1▲1
00009 744811608814480014~744811608704464148~744811401101140018~744811401607480040~744811401714140017 1▲1▲1▲1▲1
00010 744811606607177767~744811606707470064~744811608610440011~711741608004176007~744811401606180041~744811401704470014 1▲1▲1▲1▲1▲1
00011 744811607401167716~744811607408417748~711047607710460644~744811607711077714 1▲1▲1▲1
00012 460144607710400044~744811607711077716~744811400601440046~744811401104410044 1▲1▲1▲1
00013 744811607814617747~410144608807046447~744811608110140017~744811400807170010 1▲1▲1▲1
00014 744811607807117717~744811607806117747~744811608610400060~744811608804087740~744811400806070014 1▲1▲1▲1▲1
]\";
lines = Words(str, "\!N");
header = Remove From(lines, 1); // skip header
maxchar = 5;
res = Transform Each({line}, lines,
row = Words(line, "\!t");
char_to_add = maxchar - (Length(row[2]) - Length(Substitute(row[2], "~", "")));
item1 = row[1];
item2 = row[2] || Repeat("~", char_to_add);
item3 = row[3] || Repeat("▲", char_to_add);
new_line = Eval Insert("^item1^\!t^item2^\!t^item3^");
);
Insert Into(res, header, 1);
dt = Open(Char to blob(Concat items(res, "\!N")), "text");

Scripting Index and Scripting Guide should cover everything you need to do something like this (outside of the last line).
Re: Can implement this substitution with an operation with a regular?Thanks Experts!
python's
for i in range(4, len(columns)):
col = columns[i]Re: Can implement this substitution with an operation with a regular?Use For Each() and Index() in JSL
Edit:
Or just use normal For loop, just start loop from 4 and make it non-exclusive to lenght
Re: Can implement this substitution with an operation with a regular?Thanks Experts!
Transposed is equivalent.