What is `/[^0-9a-z]/` and `/\W/g`?

What is `/[^0-9a-z]/` and `/\W/g`?
0.0 0


I have used /[^0-9a-z]/ and /\W/g in palindrome challenge i.e. str.replace(/[^0-9a-z]/gi,’’)
I know how replace works, but I don’t know everything about this /[^0-9a-z]/
Can someone explain me each and every character of this??


Cannot recommend this series highly enough, helped me finally understand and love regexp



This tutorial could help you out.