We are using a preg_replace to get a well formated time string. The result should look like this:
mo-sa9:00-20:00uhr
=> mo-sa 09:00-20:00uhr
The regex is:
preg_replace('=[^d](d{1})[.:](d{2})=U', ' 0${1}:${2}', $norm)
The result is: mo-s 09:00-20:00uhr
After many attempts, I found that I couldn’t seem to find a pattern that correctly formatted the time string.
The replacement seems to be the problem or am I looking at it wrong?