Skip to content
Advertisement

Removing the integers in the output when inputted with a String [closed]

I am struggling on my code. My prof told us to make a line of code in Eclipse which, when a string like a “q1w2e3r4t5y” is input, will output only “qwerty”. The numbers are removed. This can be easily achieved using a regular expression. My problem is, it is my first year in coding and I’m not yet familiar with the code using Java.

The code using regex is

JavaScript

And the console/output is

JavaScript

Please tell me what code is the best way to execute this output without using the regex.

Advertisement

Answer

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement