Pig Latin 2.0 ask

Tell us what’s happening:
Whats wrong with my code? Why I can’t pass this task?

Your code so far


function translatePigLatin(str) {
  return str.replace(/(^[A,E,I,O,Y])(\w+)/i,"$1$2way").replace(/(^[B,C,D,F,G,H,J,K,L,M,N,P,Q,R,S,T,V,X,Z,W]+)(\w+)*/i,'$2$1ay');
}

translatePigLatin("glv");


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36.

Link to the challenge:

“Y” is not a vowel.