Quote:
Originally Posted by zreenmkr
could toolbar button or contextmenu action be intercepted? ... If there is a possibility, then I'm thinking get length of crawled in package if it greater than say 20 crawled then terminate the action.
|
Possible only with context menu commands which execute a script. In this case, can check length of selected links array before opening them in a browser.
Quote:
regex to match last occurrence....
|
Use greedy quantifier when you want to get the longest match before the last occurrence.
Code:
var file = 'Stay healthy by walking everyday aby John Doe';
var regex = /.*by\s(.*)/i;
var authorName = file.replace(regex, '$1');
alert(file + '\r\n' + 'authorName: ' + authorName);