このような文の一部を抽出するにはどうすればよいですか?
var sentence = "This is my sentence. I want to extract a part of it (in javascript !)";
var subSentence1 = "nt t";
var subSentence2 = "t (in javasc";
var result1 = f(sentence,subSentence1);
var result2 = f(sentence,subSentence2);
欲しいのですが:
result1="したい"
と
result2 = "it(in javascript"
ありがとう