How can I remove vowels from a string except for the vowel at the end of a word?
For example, "Please come to my party"
"Please come to my party"
To return "Plse cme to my prty"
"Plse cme to my prty"
string.replaceAll("[aeiou]\\B", "")
Reads: matches all vowels ( [aeiou] ), which are not followed by "end of word" ( \\B ). For more information read the Javadoc at java.util.regex.Pattern
[aeiou]
\\B
Turn the string into a char array.
Iterate through it.
Add each character to StringBuilder if the next character is not an alphabetic character.
Source: https://habr.com/ru/post/888520/More articles:Abstract against the release - memory-managementrelease / autoadvertising cocoa confusion for iphone - iphoneRuby on rails routing username matching - ruby | fooobar.comThe specified transaction does not meet the criteria for issuing a loan - djangoReflecting sphinx fuzzy search? - sphinxComparing LDAP Attributes - comparisonCaptcha control does not work with URL routing (ASP.NET 4.0 WebForms) - c #how to convert byte array to integer array - javaPython super () - should work, but no? - pythonListView item in winform - c #All Articles