Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

remove letter until vowel javascript

const words = ['Art', 'Cheat', 'Cart', 'Jog', 'Fun', 'eat', 'Beat', 'meat', 'Run', 'Smart', 'cat', 'blog'];
const regex = /^[^aeiou]+(?=[aeiou])/gi; // NOTICE THE i FLAG HERE

for(i = 0; i < words.length; i++)
  console.log(words[i] + ' > ' + words[i].replace(regex, ''));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #letter #vowel #javascript
ADD COMMENT
Topic
Name
9+2 =