Mega Code Archive
Categories
/
Ruby
/
String
Replace first vowel with an asterisk
s = "hello" s[/[aeiou]/] = '*' # Replace first vowel with an asterisk