JavaScript RegExp $ 量词
- Previous Page {X,}
- Next Page ^
- Go to the Previous Level JavaScript RegExp Reference Manual
实例
例子 1
在字符串末尾搜索 "is" :
let text = "Is this his"; let pattern = /is$/;
例子 2
在每行末尾对 "is" 进行全局多行搜索:
let text = `Is this all there is` let pattern = /is$/gm;
语法
new RegExp("n$\)
Or abbreviated as:
/n$/
带修饰符的语法
new RegExp("n$", "g")
Or abbreviated as:
/n$/g
Browser Support
/n$/
Is ECMAScript1 (ES1) Feature.
All browsers fully support ES1 (JavaScript 1997):
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Support | Support | Support | Support | Support | Support |
- Previous Page {X,}
- Next Page ^
- Go to the Previous Level JavaScript RegExp Reference Manual