+ 9

[CHALLENGE]

Create a program that removes any number from a String and outputs the new value example: String sololearn = "Solo537learn"; // output = Sololearn

20th Mar 2018, 7:01 AM
Moses Katsina
Moses Katsina - avatar
16 Answers
26th Mar 2018, 7:19 PM
MeanMachine
MeanMachine - avatar
+ 21
https://code.sololearn.com/cTWERkbGpWR5/?ref=app
20th Mar 2018, 1:18 PM
LukArToDo
LukArToDo - avatar
25th Mar 2018, 1:29 AM
David Ashton
David Ashton - avatar
+ 12
S="Solo537learn" print (*[i for i in S if not (i.isnumeric())],sep='') https://code.sololearn.com/cotWa27X3hKt/?ref=app
20th Mar 2018, 7:14 AM
Louis
Louis - avatar
+ 10
My solution: • One-liner • No if statements • 40 bytes https://code.sololearn.com/cJGfbCY9FXUC/?ref=app
20th Mar 2018, 9:19 AM
ƒred
ƒred - avatar
+ 9
C++: string s; getline(cin,s); cout<<regex_replace(str,regex("[\\d]+"),"");
20th Mar 2018, 7:41 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
20th Mar 2018, 7:32 AM
Sudarshan Rai
Sudarshan Rai - avatar
+ 7
https://code.sololearn.com/cXOpmKdeZKIY/?ref=app
22nd Mar 2018, 1:02 PM
KäzÎ MrÎdÚl HøssäÎn
KäzÎ MrÎdÚl HøssäÎn - avatar
20th Mar 2018, 4:16 PM
William Then
William Then - avatar
+ 2
https://code.sololearn.com/cmSggQa6rz87/?ref=app
21st Mar 2018, 1:15 AM
Galen Schick
Galen Schick - avatar
+ 2
SUGGESTION: Also try removing special characters from the imputed string. For example, INPUT: benze-6-#/\ne OUTPUT: benzene
3rd Jun 2018, 8:30 AM
Rahul George
Rahul George - avatar
- 2
bhai zara hindi me sikha do yaar
21st Mar 2018, 7:29 PM
Iliyas Momin
Iliyas Momin - avatar