JavaScript/Regular expressions/Exercises

Topic: Regular Expressions

1. Does the password "kw8h_rt" contain a digit?

2. Be creative! Define a rule for passwords, read a password from the user using, and check it.

3. Does the sentence "Kim and Maren are friends." contains the word "are"?

4. Be creative! Read strings from the user that match the following regular expressions: Discuss the meaning of the above REs with your colleague.

5. Normalize the phone number "0800 123-456-0" by stripping out all non-numerical characters.

6. Split the following sentences into an array that contains only its words.

"Tom cried: 'What the hell is going on?'. Then he left the room."