Question: Regular Expression in JavaScript Lab 8 In this lab, I want you to write a javascript regular expression that will go into the text of
Lab 8 In this lab, I want you to write a javascript regular expression that will go into the text of this lab, and replace every occurrence of lab' with Lab', minus the quotes. That is, make all of the lab instances Lab instead. Leave the capital Labs the same. Lab lab ab lablab. Remember to use the global marker, g, to catch all instances of lab, rather than just the first! This ends up being a pretty small solution, although it may take you a minute to figure out the exact nature of the regex. Store this whole text in a string, and alert the resulting string after performing the replace
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
