Syntax with modifiers:
new RegExp("m?", "g")
Example 1: This example matches the word e followed by zero or one occurrences of k.
Example 2: This example replaces the word 1 followed by zero or one occurrences of 2 with “@”.
Supported Browsers: The browsers supported by RegExp ? Quantifier are listed below:
- Google Chrome
- Apple Safari
- Mozilla Firefox
- Internet Explorer
My Personal Notes arrow_drop_up
Please Login to comment...