It is return the text of the RegExp pattern.
var str = "This is a good boy";
var pattern = /boy/g;
document.write("The text of the RegExp is: " + pattern.source);
You may also want to read these related articles Click here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here