Discuss Jscript regex match period or end of string in the JavaScript Development forum on Dev Shed. Jscript regex match period or end of string JavaScript Development forum discussing JavaScript and DHTML, AJAX, and issues such as coding cross-browser JavaScript.
Posts: 12,877
Time spent in forums: 5 Months 1 Week 5 Days 7 h 59 m 26 sec
Reputation Power: 8977
1. $ isn't a character like . or \w or \d. It's an assertion. It means "at this point the string has to end". Putting it inside a character set doesn't make sense, thus when you do so it reverts to the literal character (ie, "a dollar sign").
2. Using character set for a single character is quite unnecessary.