TG Telegram Group & Channel
JavaScript | United States America (US)
Create: Update:

CHALLENGE

const text = 'Today is 2023-12-31 and tomorrow is 2024-01-01';
const dateRegex = /(\d{4})-(\d{2})-(\d{2})/g;

let result = '';
let match;

while ((match = dateRegex.exec(text)) !== null) {
const [fullMatch, year, month, day] = match;
result += `${day}/${month}/${year.slice(2)} `;
}

console.log(result.trim());

CHALLENGE

const text = 'Today is 2023-12-31 and tomorrow is 2024-01-01';
const dateRegex = /(\d{4})-(\d{2})-(\d{2})/g;

let result = '';
let match;

while ((match = dateRegex.exec(text)) !== null) {
const [fullMatch, year, month, day] = match;
result += `${day}/${month}/${year.slice(2)} `;
}

console.log(result.trim());


>>Click here to continue<<

JavaScript




Share with your best friend
VIEW MORE

United States America Popular Telegram Group (US)