# How to trim a string value from a string?

For example: Need only " 14393430" from the string "Cart saved as Quote : 14393430" use the below function:

var quote = "Cart saved as Quote : 14393430"

var quotenum=quote.substring(quote.indexOf(':') + 1)

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/tlo62WWTkc4IvR2i-829e426753e8.png)<div id="bkmrk-last-updated%3A-june-2">---

Last updated: <span class="mc-variable General.NewDateTimeVariable variable">June 26, 2023</span>

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

</div>