I am studying regex right now. This is my question: "I think that I shall never see a poem lovely as a tree. - Joyce Kilmer" Use the regex to return "I, thi, tha, I, sha, ne, se, a, po, lo, a, a, tre, Jo, Ki"
Asked
Active
Viewed 48 times
1
-
See [What does the regex mean](http://stackoverflow.com/questions/22937618/reference-what-does-this-regex-mean). – Wiktor Stribiżew Oct 16 '17 at 23:35
-
What regex that you have tried? – Zamrony P. Juhara Oct 16 '17 at 23:54
1 Answers
0
This is what I came up with
\b[^\sAEIOUaeiou]*[aeiouAEIOU]
to break it down
\b
is a word boundary so it searches for whole words
[^\sAEIOUaeiou]*
will match any character that isnt a space or a vowel
[aeiouAEIOU]
will match the first occurence of a vowel in the word

Samantha
- 751
- 2
- 6
- 18