Inlab work for 10/24 is from the Javascript book by Dionisio and Toal
Review and Practice from D & T 10.1
p 581 1. List the strings matched by the regex
/M(rs?|(is)?s)/
p 581 2. Explain why s.replace(/$/, "!") produces the same result as s + "!"
p.582 3. Give a regex for 10-digit numbers that allows you to capture the first three digits.
p 582 4. For the regex
/(\d{5})(?:-(\d{4}))?/
give the result match array after matching against
(a)90069
(b)90045-2659
p 583 5. Evaluate the expressions, and explain any differences
(a) "zooooom".match(/o+m/)
(b) "zooooom".match(/o+?m/)
p 583 6. Evaluate the expressions, and explain any differences
(a) "".match(/<.*>/)
(b) "".match(/<.*?>/)
p 584 7. What does the regex
/(.)(.)\2\1/ describe? Give examples of strings that it matches.
p 584 8. Describe the meaning of the regex
/<[A-Za-z]+>[^<]*<\/\1>/