Quantcast
Channel: Get everything after the dash in a string in JavaScript - Stack Overflow
Viewing all articles
Browse latest Browse all 15

Get everything after the dash in a string in JavaScript

$
0
0

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 are there other ways?


Viewing all articles
Browse latest Browse all 15

Trending Articles