JAVASCRIPT Telegram 2428
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());
5👍2



tgoop.com/javascript/2428
Create:
Last 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());

BY JavaScript


Share with your friend now:
tgoop.com/javascript/2428

View MORE
Open in Telegram


Telegram News

Date: |

The visual aspect of channels is very critical. In fact, design is the first thing that a potential subscriber pays attention to, even though unconsciously. During the meeting with TSE Minister Edson Fachin, Perekopsky also mentioned the TSE channel on the platform as one of the firm's key success stories. Launched as part of the company's commitments to tackle the spread of fake news in Brazil, the verified channel has attracted more than 184,000 members in less than a month. With the “Bear Market Screaming Therapy Group,” we’ve now transcended language. Members can post their voice notes of themselves screaming. Interestingly, the group doesn’t allow to post anything else which might lead to an instant ban. As of now, there are more than 330 members in the group. How to Create a Private or Public Channel on Telegram?
from us


Telegram JavaScript
FROM American