The substring preceding the most recent match. $' is another name for the same property.
Property of RegExp
Static, Read-only
Description
Because leftContext is static, it is not a property of an individual regular expression object. Instead, you always use it as RegExp.leftContext.