Could you tell me the question mark in JavaScript regular expressions? The meaning of

in regular expressions, the question mark can represent a quantifier, 0 or 1, or a non-greedy pattern. What is the meaning of the second question mark in the following regular expressions?

/\".*?(?=\")"/g

this rule matches everything in quotation marks. Is (? = ") a grouping? what does it mean?


Zero width assertion


(? = pattern) Yes or no matching
. *" it matches any string plus "
. * (? =") matches any string before ", excluding "


.

clipboard.png

online regular expression learning


look around syntax to indicate foresight

Menu