Get everything after the dash in a string in javascript

What would be the cleanest way of doing this that would work in both IE and firefox.

My string looks like this: sometext-20202

Now the 'sometext' and the integer after the dash can be of varying length.

Should I just use substring and index of or is the other ways?



Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.