SyntaxFix
Write A Post
Hire A Developer
Questions
Also you can get the result by using substring and lastIndexOf -
substring
lastIndexOf
alert("xxx_456".substring("xxx_456".lastIndexOf("_")+1));