$ End of String
RX · Basic Patternssyntax
pattern$example
JS: /\.json$/.test('config.json') // true
JS: /\.json$/.test('config.json.bak') // false
Py: bool(re.search(r'\.json$', 'config.json')) # Trueoutput
true, false, TrueNote Matches position at end of string. With the m flag, $ matches the end of each line. In Python, re.match only checks the start -- use re.search with $ to check the end.