source is a read-only string property of RegExp objects. It contains the text of the RegExp pattern. This text does not include the delimiting slashes used in regular-expression literals, and it does not include the "g", "i", and "m" attributes.
Its syntax is as follows −
Returns the text used for pattern matching.
Try the following example program.
The regular expression is : script