Question: i have this sample string and i want to explode the day,month,hour,minutes,(am/pm) wih regex:

```
SunDec 16 00:00am

```

Using this:

```
(\w+)\s+(\w+)\s+(\d+)\:(\d+)(..)

```

But it gives me:

```
Array
(
    [0] => SunDec 16 00:00am
    [1] => SunDec
    [2] => 16
    [3] => 00
    [4] => 00
    [5] => am
)

```

I cant figure it out..Can i explode SubDec into two?

Answer: 
You could try this:

```
$str = 'SunDec 16 00:00am';

preg_match('/([A-Z]{1}\w+)([A-Z]{1}\w+)\s+(\w+)\s+(\d+):(\d+)(..)/', $str, $ret);

print_r($ret);

```
You can try this Regular Expression, This might help you

```
([A-Z][a-z]+)+\s(\d+)?\s?(\d+)\:(\d+)([a-z]+)

```