6 kyu

Remove the parentheses

2,666 of 7,216topping

Description:

Remove the parentheses

In this kata you are given a string for example:

"example(unwanted thing)example"

Your task is to remove everything inside the parentheses as well as the parentheses themselves.

The example above would return:

"exampleexample"

Notes

  • Other than parentheses only letters and spaces can occur in the string. Don't worry about other brackets like "[]" and "{}" as these will never appear.
  • There can be multiple parentheses.
  • The parentheses can be nested.
Strings
Algorithms
Regular Expressions
Fundamentals

More By Author:

Check out these other kata created by topping

Stats:

CreatedOct 6, 2020
PublishedOct 6, 2020
Warriors Trained15872
Total Skips854
Total Code Submissions35448
Total Times Completed7216
Python Completions2666
Rust Completions237
JavaScript Completions2425
Haskell Completions89
C Completions276
C# Completions501
C++ Completions497
Java Completions748
NASM Completions24
COBOL Completions7
Factor Completions11
BF Completions15
Total Stars304
% of votes with a positive feedback rating93% of 942
Total "Very Satisfied" Votes821
Total "Somewhat Satisfied" Votes106
Total "Not Satisfied" Votes15
Total Rank Assessments22
Average Assessed Rank
6 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • topping Avatar
  • imjasonmiller Avatar
  • JohanWiltink Avatar
  • Voile Avatar
  • rowcased Avatar
  • clcraig Avatar
  • hobovsky Avatar
  • 5h3ll Avatar
  • username0 Avatar
  • WestwardLand968 Avatar
  • Wisdou Avatar
  • akar-0 Avatar
  • Just4FunCoder Avatar
  • farhanaditya Avatar
  • razetime Avatar
  • saudiGuy Avatar
Ad