Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(\d{4})-(\d{2})-(\d{2})\s(\d{2}):(\d{2}):(\d{2})
/
gm

Description

Convert your date from yyyy-mm-dd to mm/dd/yyyy and your time from hour:minute:second to hour:minute.

You can manipulate the data further with your own function.

Submitted by anonymous - 3 years ago