How to retrieve value between 2 characters?

var str="Cart saved as Quote No :14393430*";

var mySubString = str.substring(str.lastIndexOf(":") + 1,str.lastIndexOf("*"));

You can use the below code to retrieve the value between ":" and "*"


Last updated: June 26, 2023

If you have any feedback on this topic, please contact us at documentation@appvance.ai


Revision #4
Created 2026-07-31 15:40:09 UTC by Admin
Updated 2026-10-14 12:57:37 UTC by AI_Mananger