Linux provides grep for text filtering. But in some situations we may need more extended tool to match given pattern in given text files. This tool is called Extended Global Regular Expression Print or simply egrep . egrep provides extended features over regular grep tool. Syntax Syntax of egrep command...
var str = "This is an example about regex for poftut.com";
var re = new RegExp( "poftut", "g" );
var result = re.exec(str);
str is the text data we want to regex. re is our regex object to regex. re.exec() gets...