I am using this code to try and delete everything from the beginning bracket [ to the first semicolon. The memo field starts with the bracket and has several ';' however I only need to delete to the first semicolon. For example, the first pass shows a semicolon at 34; when I execute this code...
I am back to a nesting issue. I got this GREAT code; I do not know how to nest it with the white spaces code?
stringvar array x := split({tbl.col},"]");
numbervar i;
numbervar j := ubound(x);
stringvar y := "";
for i := 1 to j-1 do(
y := y + trim(extractstring(x[i],"","["))+"; "
);
if len(y) >...
Here is a sample of what might appear in the memo field:
Julie just ran three miles and found her time was five/six seconds better then last time [5/25/2009 18:22:00 : jlclancy] T cleared [5/26/2009 5:22:00 : torgermj]
This type of text, with the time, date and comment can go on and on; the...
...eg,
stringvar input := {tbl.col};
stringvar output := '';
numbervar i;
input := Trim(input);
for i := 1 to Length(input)
do
if not(input[i] in [Chr(13),Chr(10)])
then output := output + input[i];
if right(output,1) = "]" then
left(output,instr(output,"[")-1)
else
{tbl.col};
Yes; I need to delete the text as well. I was using this, but after it finds and deletes the first set of brackets and text it does not continue through the memo field:
if right({tbl.col},1) = "]" then
left({tbl.col},instr({tbl.col},"[")-1)
else
{tbl.col}
That worked perfect, thank you!
As you can imagine, once the brackets and white spaces are removed there is a lot of new space; the field does not adjust.
Also, do you know a way to delete the text between the brackets. I was using this code; it does not work once it finds the first set of...
If I put them both in one or the other will stop working...
Removes white spaces...
stringvar input := {tbl.col};stringvar output := '';numbervar i;input := Trim(input);for i := 1 to Length(input)
Step 1 do if not(input[i] in [Chr(13),Chr(10)])
then output := output + input[i];output...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.