Is there a way to get only numbers from text

I'm having issues with getting only numbers from some text. For example lets say I have a string of text saying "[1928]" and I don't want those brackets there. How would I automatically remove them so that any string of text with numbers in it will output only numbers?

Those [ ] marks are usually signs that you are trying to treat lists like pieces of text, instead of selecting items from them.

If you are doing this project for a grade, that might cost you.

Oh okay thank you, do you have a recommendation on how to get the part of the list to act like a number or some text? (if possible)

By the way here is my code if you could recommend me anything or if it helps you.

An example of how you would extract a value from a list of lists

image

Instead of asking query one by one, you could post actually what did you get as response and what you want, so the user time also could be saved