+ 3

How to extract values from a string using regex?

I have a file named log.txt. It's a chat log with a pattern of "[time] name: message" on each line. How can I extract time, name and message using regex?

12th May 2019, 4:41 AM
luʁi
3 Réponses
+ 6
Different programming languages have different syntax and interfaces to deal with regex. What language does your query pertain to?
12th May 2019, 4:43 AM
Hatsy Rei
Hatsy Rei - avatar
+ 3
Hatsy Rei I'm using JavaScript.
12th May 2019, 4:45 AM
luʁi