Remove Vowels from an Array in Ruby

0
963

In this guide we’ll examine how to remove all of the vowels from an array in Ruby by leveraging regular expressions.

Summary

Build a method that removes the vowels from a Ruby collection.

Exercise File

Code File

Exercise Description

Given the following array of strings:

['a', 'b', 'c']

Build a method that removes the vowels from a Ruby array.

Expected Output

['b', 'c']

Real World Usage

There are a number of ways to implement this solution. One of the most efficient is to utilize regular expressions. When it comes to parsing string data, using regular expressions is an important skill to have due to its pattern matching capabilities.

Solution

Can be found on the solutions branch on github.

LEAVE A REPLY

Please enter your comment!
Please enter your name here