This is really puzzling me.
This works fine for me.
var result = "this is my abc book";
console.log(result); // displays "this is my abc book"
var res = result.substr(3);
console.log(res); // displays "s is my abc book"
However, suppose I put "this is my abc book" into the field, and run this code, there are problems:
var str = "this is my abc book"; //$(this).val();
console.log(str); // displays "this is my abc book"
var result = str.match(/abc.*/i);
console.log(result); // displays "abc book"
var res = result.substr(3);
console.log(res); // does not display at all!
It seems to me that .match is returning something which can't be cut by .substr.
I've also tried .split and .substring but not joy.
So in other words, how can I get a substr from a regex match?