January 20, 200619 yr I need some help with a Custom Function that removes everything between "<" and ">" in a text field. It can, and will occur Numermous times So it needs to be some kind of a replace function. I'm having a huge brain freeze today, can anyone help me out? Example of Text Field: 1123 3242 I'm replacing the "" and "" with what I want, but the rest of the stuff can be ANYTHING, even special characters. Can have up to 150 Lines in it of the same thing. The stuff after "" (other than the value 1123) and after the value are useless to me, I need to get rid of them. Also, the values can include anything they want in there. Some of them are text field with user input, so I have to expect anything.
January 20, 200619 yr Hi the final result must be: 1123 3242 or 1123 3242 or Field1 1123 Field2 3242 ?
January 20, 200619 yr Author At the beginning I parse out the "" with a different Header. At the time I want to use this function anything between < and > i want removed
January 20, 200619 yr This will do the trick, with any text in the tags. RemoveTags( txt ) = Let ( [ tagStart = Position( txt; "<"; 1; 1 ); tagEnd = Position( txt; ">"; tagStart; 1 ) ]; If ( tagStart <> 0; RemoveTags( Left( txt; tagStart - 1) & Right( txt; Length(txt) - tagEnd ) ); txt ) )
Create an account or sign in to comment