Jump to content

Need some help - Text Formatting


This topic is 6691 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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.

Link to comment
Share on other sites

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

)

)

Link to comment
Share on other sites

This topic is 6691 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.