I need function or code in order to remove string
1st Query:
Example: "Oldest :15 m 14 s"---> I just want to verify Oldest,m and s
Example : Oldest:14t-----> I just want to verify Oldest and t
2nd Query:
Example: This is great (14)---> I just want "This is great" it can be This can be great day (17) then i need "This can be great day"
Please provide solution ASAP

Midhun TpRank #388 · 6.5K reputationPosted Sep 28, 2016, 11:28 PM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Sep 28, 2016, 8:47 PM EDT
Madhanmohan DevarajanRank #342 · 7.3K reputationPosted Sep 28, 2016, 8:19 AM EDT
var res = str.substring(1, 4);
The result of res will be:
var res = str.substring(0, str.indexOf("!"));
The result of res will be: