I have this string
"551230(95.169%)"
I want only numbers from bracket like 95.169.
I have this string
"551230(95.169%)"
I want only numbers from bracket like 95.169.
EZ PZ. Just split
twice:
let a = "551230(95.169%)".split("(")[1].split("%")[0]
console.log(a)
string is an array, you can always get characters from it
var oldstring = "551230(95.169%)"
var newstring = "";
for(i=7;i<14;i++)
{
newstring+=oldstring[i];
}
console.log(newstring);
If you don't know the length of the string, you can create a regex pattern to extract the characters between the parentheses.
\((.*?)\)
would work