August 19, 200817 yr if[Right(fieldname);1)="^"] set variable[$header; fieldname] What I need to do is trim the ^ when I set the variable-- Thus the set variable should look like this-- set variable[$header; ??] If I remember I would use right and trim in order for it to remove the ^. Just can't remember the correct format. Thansk for you help chuck
August 19, 200817 yr Set Variable [ $header ; TrimAll ( Substitute ( text ; "^" ; " " ) ; 1 ; 1 ) ] I do not believe the If[] test is even necessary but this *is* untested. It should remove the ^ no matter where in the field. :wink2: Edited August 19, 200817 yr by Guest
August 19, 200817 yr Only one ... it inserts a space between non-Roman and Roman text if there isn't one and it takes no more evaluations so it seems more all inclusive. I tease of course. The most important reason is to remove TWO spaces between. With a strange character such as the caret, I cannot guarantee there aren't extra spaces so I take the extra precaution to remove them.
August 20, 200817 yr Author LaRetta: Set Variable [ $header ; TrimAll ( Substitute ( text ; "^" ; " " ) ; 1 ; 1 ) ] Some of my records I use ^ in more places then at the end. Thus, this solution will not work for me. I know for a fact the ^ will be at the end of the sentence. eg. the quick brown ^fox jumped over the lazy cat[color:red]^. [color:red]I just need to remove the ^ after cat. This will always be the case. For some reason, I think I need to do a right(??) function. Edited August 20, 200817 yr by Guest
August 20, 200817 yr Try: Left ( text ; Length ( text ) - ( Right ( text ; 1 ) = "^" ) ) This will remove the last "^" (if there is one), and ONLY the last one. If the text ends with "cat^^", only the last "^" will be removed.
Create an account or sign in to comment