πŸ“Š Machine Learning
Q. Consider the following statement containing regular expressions
var text = "testing: 1, 2, 3";
var pattern = /d+/g;
In order to check if the pattern matches, the statement is
  • (A) text==pattern
  • (B) text.equals(pattern)
  • (C) text.test(pattern)
  • (D) pattern.test(text)
πŸ’¬ Discuss
βœ… Correct Answer: (D) pattern.test(text)

Explanation: The given pattern is applied on the text given in the paranthesis.

Explanation by: Mr. Dubey
The given pattern is applied on the text given in the paranthesis.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
155
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
90%
Success Rate