Skip to content

Instantly share code, notes, and snippets.

@pujianto
Last active May 19, 2020 14:54
Show Gist options
  • Save pujianto/e49f5c83a8ba6732c96e9d8b3f10a728 to your computer and use it in GitHub Desktop.
Save pujianto/e49f5c83a8ba6732c96e9d8b3f10a728 to your computer and use it in GitHub Desktop.
Replace vocal letters with i letter (case sensitive)
sentence.replace(/(a|u|e|o)/gi, (letter) => letter.toLowerCase() === letter ? 'i' : 'I')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment