A read-only property that contains the text of the pattern, excluding the forward slashes and "g" or "i" flags.
Property of RegExp
Read-only
Description
source is a property of an individual regular expression object.
You cannot change this property directly. However, calling the RegExp.compile method changes the value of this property.