Zero Tolerence Posted January 20, 2006 Posted January 20, 2006 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.
Raybaudi Posted January 20, 2006 Posted January 20, 2006 Hi the final result must be: 1123 3242 or 1123 3242 or Field1 1123 Field2 3242 ?
Zero Tolerence Posted January 20, 2006 Author Posted January 20, 2006 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
The Shadow Posted January 20, 2006 Posted January 20, 2006 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 ) )
Recommended Posts
This topic is 6880 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now