8 kyu

String cleaning

11,433 of 28,406mkelty

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 Trained38132
Total Skips1724
Total Code Submissions60503
Total Times Completed28406
Python Completions11433
JavaScript Completions13618
Elixir Completions317
C# Completions1606
Ruby Completions795
C Completions420
COBOL Completions11
NASM Completions27
Julia Completions41
CoffeeScript Completions14
Scala Completions42
Java Completions692
Lua Completions26
Total Stars296
% of votes with a positive feedback rating93% of 2949
Total "Very Satisfied" Votes2564
Total "Somewhat Satisfied" Votes343
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