RegEx for consonants

Hello all!

I wrote a basic program in JavaScript which tells you how many vowels and consonants includes your sample text. I didn’t satisfied 4th line in my code. I want to write it with something special like;

everything - [aeiou]

instead of typing

bcdfgh…

I googled a bit but results which I found didn’t worked. I’m waiting for your ideas!
Peace:face_with_hand_over_mouth:

2 Likes

Yes, thats why exactly I want.

But the point isn’t the length of code. For example I just noticed I wrote …wxys… instead of …wxyz.
I am wondering if I wrote that line something like

let consonantRegex = /everywords - [aeiou]/gi;