Regular Expressions In JavaScript Interview Questions – Regular Expressions (RegEx) In JavaScript Online quiz

Question 1:  What is the purpose of Regular Expressions in JavaScript?

Question 2:  Which method is used to test a regular expression against a string?

Question 3:  What does the caret symbol (^) represent in a regular expression?

Question 4:  What does the dollar sign ($) represent in RegEx?

Question 5:  What does the dot (.) symbol match in a regular expression?

Question 6:  Which RegEx flag is used for case-insensitive matching?

Question 7:  Which symbol is used to match zero or more of the preceding character?

Question 8:  ”What

match?” options=”(A) Any lowercase letter,(B) Any number,(C) Any uppercase letter” correct=”8A”]

Question 9:  What does the expression \d match?

Question 10:  Which method returns an array of all matches found?

Leave a Reply