I handle a monitoring tools for application. I have data like this:
WebSphere_MB[MB7QMGR-MB7BROKER-default_abc]@esb01:2222222
WebSphere_MB[MB7QMGR-MB7BROKER-default]@esb01
WebSphere_MB[MB7QMGR-MB7BROKER-xxxabc]@esb01:11111111
WebSphere_MB[MB7QMGR-MB7BROKER-esbon2a]@esb01
WebSphere_MB[MB7QMGR-MB7BROKER-esbon2b]@esb01
WebSphere_MB[MB7QMGR-MB7BROKER-devxxx]@esb01
WebSphere_MB[MB7QMGR-MB7BROKER-defg]@esb01
I need to filter only statement which contains "xxxabc", "default_abc" and "devxxx" that appear in my data.
What regex should I used to do that?
It seems that you want to select all statements which either has "abc" or "xxx".
try using /(abc)|(xxx)/g
or try your data with http://www.regexr.com/ - its easy to build your regEx
Below will select whole statements matching "abc" or "xxx"
.*?(?:abc|xxx).*
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments