JavaScript RegExp {x,y} QuantifierThe {X, Y} quantifier contains and matches numbers from the x to y range. The regex quantifier operates in a string of numbers with the regular expression's search, match, test, and exec method. We can use regex modifiers for the available character with the quantifier. SyntaxTo get available characters, the following syntax uses a regular expression {x,y} quantifier. Or Description
Supported BrowsersThe given browsers support the javascript regex {x,y} quantifier.
ExamplesThe following examples use the {x,y} quantifier of the javascript regex. We can use numbers as characters in the quantifier. Example1: The given example shows the value range for the "j" character in the string. We can see the available range values of the input data. Output The output shows the value for the range of the quantifier. Example2: The given example shows the available range values of the input data using the match method. Output The output shows the value for the range of the quantifier. Example 3: The given example shows the range value's availability for the string's numerical values. We can see the available range values of the input data using the test method. Output The output shows the test value for the range of the quantifier. Example 4: The given example shows the range value for the numerical values in the string and replaces the required data. Output The output shows the replace value for the range of the quantifier. Example 5: The given example shows the index position of the value in the string. Output The output shows the position of the range of the quantifier. ConclusionThe "x,y" quantifier sets the range from minimum and maximum value with the regular expression in javascript. |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India