+ 3
Manav Roy
The second parameter in s.substring is the number of characters, not the end index.
try this:
s=s.substr(i1+1,i2-i1-1);
+ 4
The 2nd argument of the substr method is not the end index but the span (how many characters from the starting point)
s=s.substr(i1+1,i2-i1-1);
+ 1
Manav Roy
You probably would have to mess around with regex sooner or later. It is a pain to get right.
https://code.sololearn.com/cGnWsbs8BvB8/?ref=app