Regular Expressions 101

Library entries

IBM MQ Log Parser

Vote

0

Regular Expression
pcre2

/
(?ms)(?<date>[0-9]{1,2}\/[0-9]{1,2}\/[0-9]{4})\s(?<time>[0-9]{2}:[0-9]{2}:[0-9]{2})\s-\sProcess\((?<process>.*?)\)\sUser\((?<user>.*?)\)\sProgram\((?<program>.*?)\)\n\s*Host\((?<host>.*?)\)\sInstallation\((?<installation>.*?)\)\s*VRMF\((?<vrmf>.*?)\)\sQMgr\((?<qmgr>.*?)\)\s*(?<errorCode>AMQ[0-9]{4}):\s(?<errorDesc>.*?)EXPLANATION:\s*(?<explanation>.*?)ACTION:\s*(?<action>.*?)\s-{1,10}\s(?<source>.*?)\s\:\s(?<linenumber>[0-9]{0,4})\s-{50,60}
/
gm

Description

Loading markdown...
Submitted by James Phillips - a month ago