adplus-dvertising
frame-decoration

Question

What will be the result when non greedy repetition is used on the pattern /a+?b/ ?

a.

Matches the letter b preceded by the fewest number of a's possible

b.

Matches the letter b preceded by any number of a

c.

Matches letter a preceded by letter b, in the stack order

d.

None of the mentioned

Posted under JavaScript

Answer: (a).Matches the letter b preceded by the fewest number of a's possible

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the result when non greedy repetition is used on the pattern /a+?b/ ?

Similar Questions

Discover Related MCQs

Q. What does the subexpression /java(script)?/ result in ?

Q. What is the most essential purpose of parantheses in regular expressions ?

Q. The method that performs the search-and-replace operation to strings for pattern matching is

Q. What would be the result of the following statement in JavaScript using regular expression methods ?

Q. The Crockford's subset doesnot include which function in JavaScript?

Q. Why does JavaScript subset disallow == and !=?

Q. What is being imposed on each subset to ensure that it conforms to the subset?

Q. Why was "The Good Parts" designed as a language subset in JavaScript?

Q. Which is the subset that is a secure container designed for the purpose of safely running untrusted JavaScript?

Q. Why is the this keyword forbidden in JavaScript?

Q. Which are the two functions that are not allowed in any secure subset?

Q. Which is the object that defines methods that allow complete control over page content?

Q. Which was one of the first security subsets proposed?

Q. Which is the subset that transforms web content into secure modules that can be safely hosted on a web page?

Q. Consider the following code snippet:

const pi=3.14;
var pi=4;
console.log(pi);

What will be the output for the above code snippet?

Q. The let keyword can be used

Q. The main difference between the variables declared with var and with let is

Q. Consider the following code snippet:

console.log(p)

If p is not defined, what would be the result or type of error?

Q. Consider the following code snippet:

let x=x+1;
console.log(x);

What will be the result for the above code snippet?

Q. Consider the following code snippet:

[x,y]=[y,x];

What is the result of the above code snippet?