8 kyu

String cleaning

11,314 of 28,169mkelty

Description:

Your boss decided to save money by purchasing some cut-rate optical character recognition software for scanning in the text of old novels to your database. At first it seems to capture words okay, but you quickly notice that it throws in a lot of numbers at random places in the text.

Examples (input -> output)

'! !'                 -> '! !'
'123456789'           -> ''
'This looks5 grea8t!' -> 'This looks great!'

Your harried co-workers are looking to you for a solution to take this garbled text and remove all of the numbers. Your program will take in a string and clean out all numeric characters, and return a string with spacing and special characters ~#$%^&!@*():;"'.,? all intact.

Regular Expressions
Fundamentals
Strings

More By Author:

Check out these other kata created by mkelty

Stats:

CreatedSep 21, 2016
PublishedSep 21, 2016
Warriors Trained37854
Total Skips1703
Total Code Submissions60010
Total Times Completed28169
Python Completions11314
JavaScript Completions13547
Elixir Completions316
C# Completions1597
Ruby Completions792
C Completions413
COBOL Completions11
NASM Completions25
Julia Completions41
CoffeeScript Completions14
Scala Completions42
Java Completions661
Lua Completions23
Total Stars292
% of votes with a positive feedback rating93% of 2934
Total "Very Satisfied" Votes2551
Total "Somewhat Satisfied" Votes341
Total "Not Satisfied" Votes42
Total Rank Assessments9
Average Assessed Rank
8 kyu
Highest Assessed Rank
8 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • mkelty Avatar
  • baaart Avatar
  • ZozoFouchtra Avatar
  • zebulan Avatar
  • suic Avatar
  • shadowmanos Avatar
  • ALNeneve Avatar
  • Madjosz Avatar
  • Souzooka Avatar
  • hobovsky Avatar
  • stellartux Avatar
  • trashy_incel Avatar
  • ejini战神 Avatar
  • akar-0 Avatar
  • dfhwze Avatar
  • KayleighWasTaken Avatar
  • metatable Avatar
Ad