jQuery string split

jQuery, .split()

by harifrais

JavaScript

var input = "123-hello-world";

var arr = input.split("-");

alert(arr[0]);