V
V
VladMokrousov2021-06-18 11:42:17
JavaScript
VladMokrousov, 2021-06-18 11:42:17

How to write a regular

Guys, I'm not strong in regular expressions, tell me how to convert from this 06/16/2021, 17:57:53 to this 06/16/2021 17:57
I know what can be done using split and other methods, but I need an elegant solution)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2021-06-18
@VladMokrousov

I know what can be done with split and other methods, but I need an elegant solution

Regular expressions are not synonymous with elegant solutions.
str.slice(0, -3).replace(',', '')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question