I am trying to create the following regular expression in PHP to match the following:
[2013-01-01 12:34:12.123] [USERNAME] something
I am able to get part of the first part but I am new to regex in php, any help is appreciated.
Important note: any space above could be one space or more.
(This is what I got so far)
/^[\[][0-9]{4}-[0-9]{2}-[0-9]{2}]/
I am using this tool to test that my regex match: http://www.pagecolumn.com/tool/pregtest.htm (just want to confirm that it is an okay tool).
Update: to clerify more, something could be any amount of text, white spaces above could be any amount of white spaces and USERNAME could be any amount of text as well.