<!DOCTYPE html> <html> <body> <script> var str = ["1818-15-3", "1819-16-3"]; var arr = str.split(":"); document.write(arr[1] + ":" + arr[2]); </script> </body> </html>