Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Sandbox

Post History

50%
+0 −0
Sandbox Just the vowels please [FINALIZED]

posted 1y ago by trichoplax‭  ·  edited 1y ago by trichoplax‭

#5: Post edited by user avatar trichoplax‭ · 2022-10-08T00:36:33Z (over 1 year ago)
Mark as finalized
  • Just the vowels please
  • Just the vowels please [FINALIZED]
  • Given a sequence of letters, output only the vowels.
  • ## Input
  • - A sequence of letters
  • - This may be a string or any ordered data structure of characters
  • - The letters may contain a mixture of upper and lower case
  • - The characters that count as letters for this challenge are A-Z and a-z, specifically `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`
  • - The input may be empty (it may have length zero)
  • ## Output
  • - All of the vowels from the input, in the same order, and nothing else
  • - Vowels that appear more than once in the input must appear the same number of times in the output
  • - If there are no vowels in the input, the output is empty (a sequence of length zero)
  • - The characters that count as vowels for this challenge are `AEIOUaeiou`
  • - Case must be maintained - a vowel that is lower case in the input must be lower case in the output, and a vowel that is upper case in the input must be upper case in the output
  • ## Test cases
  • Test cases are in the format `"input" : "output"`
  • ```text
  • "" : ""
  • "q" : ""
  • "S" : ""
  • "Rhythm" : ""
  • "a" : "a"
  • "art" : "a"
  • "atr" : "a"
  • "rat" : "a"
  • "rta" : "a"
  • "tar" : "a"
  • "tra" : "a"
  • "emu" : "eu"
  • "eum" : "eu"
  • "meu" : "eu"
  • "mue" : "ue"
  • "uem" : "ue"
  • "ume" : "ue"
  • "AaeEIiOouU" : "AaeEIiOouU"
  • "aaaaaaaa" : "aaaaaaaa"
  • "bbbbbbbb" : ""
  • "abababab" : "aaaa"
  • "babababa" : "aaaa"
  • "aLtErNaTe" : "aEae"
  • ```
  • > Explanations are optional, but I'm more likely to upvote answers that have one.
  • # Now posted: [Just the vowels please](https://codegolf.codidact.com/posts/287182)
  • ---
  • Given a sequence of letters, output only the vowels.
  • ## Input
  • - A sequence of letters
  • - This may be a string or any ordered data structure of characters
  • - The letters may contain a mixture of upper and lower case
  • - The characters that count as letters for this challenge are A-Z and a-z, specifically `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`
  • - The input may be empty (it may have length zero)
  • ## Output
  • - All of the vowels from the input, in the same order, and nothing else
  • - Vowels that appear more than once in the input must appear the same number of times in the output
  • - If there are no vowels in the input, the output is empty (a sequence of length zero)
  • - The characters that count as vowels for this challenge are `AEIOUaeiou`
  • - Case must be maintained - a vowel that is lower case in the input must be lower case in the output, and a vowel that is upper case in the input must be upper case in the output
  • ## Test cases
  • Test cases are in the format `"input" : "output"`
  • ```text
  • "" : ""
  • "q" : ""
  • "S" : ""
  • "Rhythm" : ""
  • "a" : "a"
  • "art" : "a"
  • "atr" : "a"
  • "rat" : "a"
  • "rta" : "a"
  • "tar" : "a"
  • "tra" : "a"
  • "emu" : "eu"
  • "eum" : "eu"
  • "meu" : "eu"
  • "mue" : "ue"
  • "uem" : "ue"
  • "ume" : "ue"
  • "AaeEIiOouU" : "AaeEIiOouU"
  • "aaaaaaaa" : "aaaaaaaa"
  • "bbbbbbbb" : ""
  • "abababab" : "aaaa"
  • "babababa" : "aaaa"
  • "aLtErNaTe" : "aEae"
  • ```
  • > Explanations are optional, but I'm more likely to upvote answers that have one.
#4: Post edited by user avatar trichoplax‭ · 2022-10-08T00:32:47Z (over 1 year ago)
Golf the explanation request
  • Given a sequence of letters, output only the vowels.
  • ## Input
  • - A sequence of letters
  • - This may be a string or any ordered data structure of characters
  • - The letters may contain a mixture of upper and lower case
  • - The characters that count as letters for this challenge are A-Z and a-z, specifically `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`
  • - The input may be empty (it may have length zero)
  • ## Output
  • - All of the vowels from the input, in the same order, and nothing else
  • - Vowels that appear more than once in the input must appear the same number of times in the output
  • - If there are no vowels in the input, the output is empty (a sequence of length zero)
  • - The characters that count as vowels for this challenge are `AEIOUaeiou`
  • - Case must be maintained - a vowel that is lower case in the input must be lower case in the output, and a vowel that is upper case in the input must be upper case in the output
  • ## Test cases
  • Test cases are in the format `"input" : "output"`
  • ```text
  • "" : ""
  • "q" : ""
  • "S" : ""
  • "Rhythm" : ""
  • "a" : "a"
  • "art" : "a"
  • "atr" : "a"
  • "rat" : "a"
  • "rta" : "a"
  • "tar" : "a"
  • "tra" : "a"
  • "emu" : "eu"
  • "eum" : "eu"
  • "meu" : "eu"
  • "mue" : "ue"
  • "uem" : "ue"
  • "ume" : "ue"
  • "AaeEIiOouU" : "AaeEIiOouU"
  • "aaaaaaaa" : "aaaaaaaa"
  • "bbbbbbbb" : ""
  • "abababab" : "aaaa"
  • "babababa" : "aaaa"
  • "aLtErNaTe" : "aEae"
  • ```
  • > Explanations in answers are optional, but I'm more likely to upvote answers that have one.
  • Given a sequence of letters, output only the vowels.
  • ## Input
  • - A sequence of letters
  • - This may be a string or any ordered data structure of characters
  • - The letters may contain a mixture of upper and lower case
  • - The characters that count as letters for this challenge are A-Z and a-z, specifically `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`
  • - The input may be empty (it may have length zero)
  • ## Output
  • - All of the vowels from the input, in the same order, and nothing else
  • - Vowels that appear more than once in the input must appear the same number of times in the output
  • - If there are no vowels in the input, the output is empty (a sequence of length zero)
  • - The characters that count as vowels for this challenge are `AEIOUaeiou`
  • - Case must be maintained - a vowel that is lower case in the input must be lower case in the output, and a vowel that is upper case in the input must be upper case in the output
  • ## Test cases
  • Test cases are in the format `"input" : "output"`
  • ```text
  • "" : ""
  • "q" : ""
  • "S" : ""
  • "Rhythm" : ""
  • "a" : "a"
  • "art" : "a"
  • "atr" : "a"
  • "rat" : "a"
  • "rta" : "a"
  • "tar" : "a"
  • "tra" : "a"
  • "emu" : "eu"
  • "eum" : "eu"
  • "meu" : "eu"
  • "mue" : "ue"
  • "uem" : "ue"
  • "ume" : "ue"
  • "AaeEIiOouU" : "AaeEIiOouU"
  • "aaaaaaaa" : "aaaaaaaa"
  • "bbbbbbbb" : ""
  • "abababab" : "aaaa"
  • "babababa" : "aaaa"
  • "aLtErNaTe" : "aEae"
  • ```
  • > Explanations are optional, but I'm more likely to upvote answers that have one.
#3: Post edited by user avatar trichoplax‭ · 2022-10-08T00:31:10Z (over 1 year ago)
Simplify output section
  • Given a sequence of letters, output only the vowels.
  • ## Input
  • - A sequence of letters
  • - This may be a string or any ordered data structure of characters
  • - The letters may contain a mixture of upper and lower case
  • - The characters that count as letters for this challenge are A-Z and a-z, specifically `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`
  • - The input may be empty (it may have length zero)
  • ## Output
  • - A sequence of zero or more letters
  • - The sequence contains all of the vowels from the input, in the same order, and nothing else
  • - Vowels that appear more than once in the input must appear the same number of times in the output
  • - If there are no vowels in the input, the output is empty (a sequence of length zero)
  • - The characters that count as vowels for this challenge are `AEIOUaeiou`
  • - Case must be maintained - a vowel that is lower case in the input must be lower case in the output, and a vowel that is upper case in the input must be upper case in the output
  • ## Test cases
  • Test cases are in the format `"input" : "output"`
  • ```text
  • "" : ""
  • "q" : ""
  • "S" : ""
  • "Rhythm" : ""
  • "a" : "a"
  • "art" : "a"
  • "atr" : "a"
  • "rat" : "a"
  • "rta" : "a"
  • "tar" : "a"
  • "tra" : "a"
  • "emu" : "eu"
  • "eum" : "eu"
  • "meu" : "eu"
  • "mue" : "ue"
  • "uem" : "ue"
  • "ume" : "ue"
  • "AaeEIiOouU" : "AaeEIiOouU"
  • "aaaaaaaa" : "aaaaaaaa"
  • "bbbbbbbb" : ""
  • "abababab" : "aaaa"
  • "babababa" : "aaaa"
  • "aLtErNaTe" : "aEae"
  • ```
  • > Explanations in answers are optional, but I'm more likely to upvote answers that have one.
  • Given a sequence of letters, output only the vowels.
  • ## Input
  • - A sequence of letters
  • - This may be a string or any ordered data structure of characters
  • - The letters may contain a mixture of upper and lower case
  • - The characters that count as letters for this challenge are A-Z and a-z, specifically `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`
  • - The input may be empty (it may have length zero)
  • ## Output
  • - All of the vowels from the input, in the same order, and nothing else
  • - Vowels that appear more than once in the input must appear the same number of times in the output
  • - If there are no vowels in the input, the output is empty (a sequence of length zero)
  • - The characters that count as vowels for this challenge are `AEIOUaeiou`
  • - Case must be maintained - a vowel that is lower case in the input must be lower case in the output, and a vowel that is upper case in the input must be upper case in the output
  • ## Test cases
  • Test cases are in the format `"input" : "output"`
  • ```text
  • "" : ""
  • "q" : ""
  • "S" : ""
  • "Rhythm" : ""
  • "a" : "a"
  • "art" : "a"
  • "atr" : "a"
  • "rat" : "a"
  • "rta" : "a"
  • "tar" : "a"
  • "tra" : "a"
  • "emu" : "eu"
  • "eum" : "eu"
  • "meu" : "eu"
  • "mue" : "ue"
  • "uem" : "ue"
  • "ume" : "ue"
  • "AaeEIiOouU" : "AaeEIiOouU"
  • "aaaaaaaa" : "aaaaaaaa"
  • "bbbbbbbb" : ""
  • "abababab" : "aaaa"
  • "babababa" : "aaaa"
  • "aLtErNaTe" : "aEae"
  • ```
  • > Explanations in answers are optional, but I'm more likely to upvote answers that have one.
#2: Post edited by user avatar trichoplax‭ · 2022-10-06T01:39:09Z (over 1 year ago)
Improve wording of input section
  • Given a sequence of letters, output only the vowels.
  • ## Input
  • - A sequence of letters
  • - This may be a string or any ordered data structure of characters
  • - The letters may contain a mixture of upper and lower case
  • - The characters that count as letters for this challenge are A-Z and a-z, specifically `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`
  • - The input may be empty (there may be zero letters)
  • ## Output
  • - A sequence of zero or more letters
  • - The sequence contains all of the vowels from the input, in the same order, and nothing else
  • - Vowels that appear more than once in the input must appear the same number of times in the output
  • - If there are no vowels in the input, the output is empty (a sequence of length zero)
  • - The characters that count as vowels for this challenge are `AEIOUaeiou`
  • - Case must be maintained - a vowel that is lower case in the input must be lower case in the output, and a vowel that is upper case in the input must be upper case in the output
  • ## Test cases
  • Test cases are in the format `"input" : "output"`
  • ```text
  • "" : ""
  • "q" : ""
  • "S" : ""
  • "Rhythm" : ""
  • "a" : "a"
  • "art" : "a"
  • "atr" : "a"
  • "rat" : "a"
  • "rta" : "a"
  • "tar" : "a"
  • "tra" : "a"
  • "emu" : "eu"
  • "eum" : "eu"
  • "meu" : "eu"
  • "mue" : "ue"
  • "uem" : "ue"
  • "ume" : "ue"
  • "AaeEIiOouU" : "AaeEIiOouU"
  • "aaaaaaaa" : "aaaaaaaa"
  • "bbbbbbbb" : ""
  • "abababab" : "aaaa"
  • "babababa" : "aaaa"
  • "aLtErNaTe" : "aEae"
  • ```
  • > Explanations in answers are optional, but I'm more likely to upvote answers that have one.
  • Given a sequence of letters, output only the vowels.
  • ## Input
  • - A sequence of letters
  • - This may be a string or any ordered data structure of characters
  • - The letters may contain a mixture of upper and lower case
  • - The characters that count as letters for this challenge are A-Z and a-z, specifically `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`
  • - The input may be empty (it may have length zero)
  • ## Output
  • - A sequence of zero or more letters
  • - The sequence contains all of the vowels from the input, in the same order, and nothing else
  • - Vowels that appear more than once in the input must appear the same number of times in the output
  • - If there are no vowels in the input, the output is empty (a sequence of length zero)
  • - The characters that count as vowels for this challenge are `AEIOUaeiou`
  • - Case must be maintained - a vowel that is lower case in the input must be lower case in the output, and a vowel that is upper case in the input must be upper case in the output
  • ## Test cases
  • Test cases are in the format `"input" : "output"`
  • ```text
  • "" : ""
  • "q" : ""
  • "S" : ""
  • "Rhythm" : ""
  • "a" : "a"
  • "art" : "a"
  • "atr" : "a"
  • "rat" : "a"
  • "rta" : "a"
  • "tar" : "a"
  • "tra" : "a"
  • "emu" : "eu"
  • "eum" : "eu"
  • "meu" : "eu"
  • "mue" : "ue"
  • "uem" : "ue"
  • "ume" : "ue"
  • "AaeEIiOouU" : "AaeEIiOouU"
  • "aaaaaaaa" : "aaaaaaaa"
  • "bbbbbbbb" : ""
  • "abababab" : "aaaa"
  • "babababa" : "aaaa"
  • "aLtErNaTe" : "aEae"
  • ```
  • > Explanations in answers are optional, but I'm more likely to upvote answers that have one.
#1: Initial revision by user avatar trichoplax‭ · 2022-10-06T00:39:20Z (over 1 year ago)
Just the vowels please
Given a sequence of letters, output only the vowels.

## Input
- A sequence of letters
- This may be a string or any ordered data structure of characters
- The letters may contain a mixture of upper and lower case
- The characters that count as letters for this challenge are A-Z and a-z, specifically `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`
- The input may be empty (there may be zero letters)

## Output
- A sequence of zero or more letters
- The sequence contains all of the vowels from the input, in the same order, and nothing else
- Vowels that appear more than once in the input must appear the same number of times in the output
- If there are no vowels in the input, the output is empty (a sequence of length zero)
- The characters that count as vowels for this challenge are `AEIOUaeiou`
- Case must be maintained - a vowel that is lower case in the input must be lower case in the output, and a vowel that is upper case in the input must be upper case in the output

## Test cases
Test cases are in the format `"input" : "output"`

```text
"" : ""
"q" : ""
"S" : ""
"Rhythm" : ""
"a" : "a"
"art" : "a"
"atr" : "a"
"rat" : "a"
"rta" : "a"
"tar" : "a"
"tra" : "a"
"emu" : "eu"
"eum" : "eu"
"meu" : "eu"
"mue" : "ue"
"uem" : "ue"
"ume" : "ue"
"AaeEIiOouU" : "AaeEIiOouU"
"aaaaaaaa" : "aaaaaaaa"
"bbbbbbbb" : ""
"abababab" : "aaaa"
"babababa" : "aaaa"
"aLtErNaTe" : "aEae"
```

> Explanations in answers are optional, but I'm more likely to upvote answers that have one.