8 kyu

String cleaning

795 of 28,381mkelty

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 Trained38105
Total Skips1723
Total Code Submissions60422
Total Times Completed28381
Python Completions11420
JavaScript Completions13614
Elixir Completions317
C# Completions1605
Ruby Completions795
C Completions417
COBOL Completions11
NASM Completions27
Julia Completions41
CoffeeScript Completions14
Scala Completions42
Java Completions688
Lua Completions26
Total Stars296
% of votes with a positive feedback rating93% of 2948
Total "Very Satisfied" Votes2563
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