Easy Tutorial
❮ Met Canvas Moveto Met Canvas Stroketext ❯

JavaScript source Property


Definition and Usage

The source property is used to return the text used for pattern matching.

Syntax


Browser Support

All major browsers support the source property.


Example

Return the text that matches the regular expression pattern:

var str="Visit tutorialpro";
var patt1=/RUN/g;
document.write("The text of the RegExp is: "+patt1.source);

❮ Met Canvas Moveto Met Canvas Stroketext ❯