Open In App

JavaScript RegExp $ Quantifier

Last Updated : 05 Aug, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

The RegExp m$ Quantifier in JavaScript is used to find the match of any string which contains m at the end of it

Syntax: 

/m$/ 

Example 1: Matches the presence of the word '123' at the end of the string. 


Output
Found 2 matches: 123,123

Example 2: This example replaces the word 'K' with '@'. 


Output
 New string: @128Geeee@

Recommended Links:


Similar Reads