Q. Consider the following JavaScript statement containing regular expressions and check if the pattern matches?

Code:
var text = "lestfindcourse: 1, 2, 3";
var pattern = /d+/g;
  • (A) pattern.test(text)
  • (B) text.test(pattern)
  • (C) text.equals(pattern)
  • (D) text==pattern
πŸ’¬ Discuss
βœ… Correct Answer: (A) pattern.test(text)

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
202
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
83%
Success Rate