$re = '/^(.*\[(error|warning|notice|info|debug)\].*)$/m';
$str = 'lu2-pre-sm-swap-manager1 (192.168.236.230) 2014-07-24 14:09:27,193 [debug] PRE-BCP 213.146.188.31 [marti.us] bcp:4934846 GET 3a90f85c /members/overview session_id: 5037d3bfa31 version: 1.54.0-SNAPSHOT-11881644 ROOT.src.Company.Departments:91...ROOT.src.Core.Database:263...ROOT.src.Core.Statistics:390: Memory usage: 7.63MB (8.00MB real), max 7.83MB (8.00MB real)
lu2-pre-sm-swap-manager1 (192.168.236.230) 2014-07-24 14:09:27,193 [debug] PRE-BCP 213.146.188.31 [marti.us] bcp:4934846 GET 3a90f85c /members/overview session_id: 5037d3bfa31 version: 1.54.0-SNAPSHOT-11881644 ROOT.src.Company.Departments:91...ROOT.src.Core.Database:263...ROOT.src.Core.Database:513: DB CACHE GET OK (total: 0, cache: 0): bcp_departments-4934846.3903997f7fe55eb81eaa07fc5e598ba0
lu2-pre-sm-swap-manager1 (192.168.236.230) 2014-07-24 14:09:27,194 [debug] PRE-BCP 213.146.188.31 [marti.us] bcp:4934846 GET 3a90f85c /members/overview session_id: 5037d3bfa31 version: 1.54.0-SNAPSHOT-11881644 ROOT.src.Company.Departments:91...ROOT.src.Core.Database:263...ROOT.src.Service.Cache.Request:72: REQUEST CACHE SET "bcp_departments-4934846.3903997f7fe55eb81eaa07fc5e598ba0" : object
lu2-pre-sm-swap-manager1 (192.168.236.230) 2014-07-24 14:09:27,237 [debug] PRE-BCP 213.146.188.31 [marti.us] bcp:4934846 GET 3a90f85c /members/overview session_id: 5037d3bfa31 version: 1.54.0-SNAPSHOT-11881644 ROOT.src.Service.Feature:140: get_real_value (webtracking, skype, GB): 1
lu2-pre-sm-swap-manager1 (192.168.236.230) 2014-07-24 14:09:27,240 [debug] PRE-BCP 213.146.188.31 [marti.us] bcp:4934846 GET 3a90f85c /members/overview session_id: 5037d3bfa31 version: 1.54.0-SNAPSHOT-11881644 ROOT.src.Swap.Application2:553: serve_endpoint (members/overview): OK';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php