edited ex6 to match \W instead of just \w