How do you remove numbers from a piece of text in labels?

How to remove numbers from a piece of text in labels?


Set the Label.Text to unnum(Label.Text)


You can try regex extension too if possible

If you need it, just test

1 Like

Only use an extension if there is no viable native solution.

1 Like

I wouldn't put it that way, because sometimes not using an extension requires time-consuming and complex blocks and possibly additional components. I could provide a number of examples of this.

I basically stick to the rules of rationality and that means realizing a given goal with the least possible effort. (See e.g. "minimum principle" of economics).

However, if a project should also be created for iOS, I had no choice (so far) but to avoid extensions.

1 Like

The choice of whether or not to use an extension depends on several factors:

  • Is this a learning exercise, where I am expected to understand and show the inner workings of the solution?
  • How long do I want my app to remain viable, in the changing Android environment?
  • How soon is my deadline?
  • Is this within native AI2 capabilities?
  • Do you expect to need support from the extension developer in the future?

P.S. I have been considering adding a heading to the Extensions FAQ
for Extension Graveyards, so I could link to stories about notable graveyard robbing fails

  1. If the exercise is save a text file in the Shared folder /Documents on Android 11+, your native solution (with AI2 components) will be: Use the File component, set DefaultFileScope to Legacy. Do you automatically understand the inner workings of the solution? Certainly not, because it leads to an absurd result, namely that WRITE permission must be declared in the manifest in order to work on Android 11+. If you had used an extension for this that would solve the problem without requesting WRITE, I'm sure you would be able to understand it. This is just one example that shows that this argument would firstly only apply to students and secondly is not conclusive.

  2. The same question arises with regard to the development environment. Will this always be available? In the case of Appybuilder, for example, that was not the case. In this respect, this is a weighing of probability. As the number of extension developers increases rapidly, the probability that an extension that a particular developer does not continue to develop (if that is even necessary) will be picked up by another developer is very high.

  3. In my case (and I think most people agree) the deadline is always "immediately" :wink:.
    The question is and remains what will get me to my goal the fastest (easiest, most efficient). See my previous post.

  4. If the solution is not possible through native AI2 features (blocks), this question is obsolete. However, if it is possible, it remains a question of weighing up effort (risk) and benefit. (See my previous post.)

  5. See point 2.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.