Sheffle tho vawols ureund!
R, 92 91
Can't comment yet so I'm adding my own answer albeit very similar to @Andreï Kostyrka answer (believe it or not but came up with it independently).
s=strsplit(readline(),"")[[1]];v=s%in%c("a","e","i","o","u");s[v]=sample(s[v]);cat(s,sep="")
Ungolfed
s=strsplit(readline(),"")[[1]] # Read input and store as a vector
v=s%in%c("a","e","i","o","u") # Return TRUE/FALSE vector if vowel
s[v]=sample(s[v]) # Replace vector if TRUE with a random permutation of vowels
cat(s,sep="") # Print concatenated vector
Saved one byte thanks to @Vlo
s=strsplit(readline(),"")[[1]];s[v]=sample(s[v<-s%in%c("a","e","i","o","u")]);cat(s,sep="")
Jelly, 15 bytes
f€“¡ẎṢɱ»ðœpżFẊ¥
Try it online!
How it works
f€“¡ẎṢɱ»ðœpżFẊ¥ Main link. Argument: s (string)
“¡ẎṢɱ» Yield "aeuoi"; concatenate "a" with the dictionary word "euoi".
f€ Filter each character in s by presence in "aeuoi".
This yields A, an array of singleton and empty strings.
ð Begin a new, dyadic chain. Left argument: A. Right argument: s
œp Partition s at truthy values (singleton strings of vowels) in A.
FẊ¥ Flatten and shuffle A. This yields a permutation of the vowels.
ż Zip the partition of consonants with the shuffled vowels.
R, 99 98 89 bytes
x=el(strsplit(readline(),""))
z=grepl("[aeiou]",x)
x[z]=x[sample(which(z))]
cat(x,sep="")
Seems to be the first human-readable solution! Thanks to Giuseppe for saving 9 bytes!
Test cases:
tho qaeck bruwn fux jemps over tho lozy dig.
progremmang pozzlos & cide gulf
Seems that there is no way to make an internal variable assignment (inside, like, cat
), and again some people are going to prove I am wrong...