const input = 'Ahmad Apriliyanto - Jakarta, Indonesia - 11 April 1998';
you have access by split with array:
const [ name, born, dateborn] = input.split('-');
console.log(name); // Ahmad Apriliyanto
console.log(born); // Jakarta, Indonesia
console.log(dateborn); //11 April 1998
const input = 'Ahmad Apriliyanto - Jakarta, Indonesia - 11 April 1998';
you have access by split with array:or by index access
('-')
this is separator, you have change on your problem.Have a nice day