문제

What is a regular expression which matches the following strings?

[INFO] abcd1234_TCT_ALCATEL_one_touch_995 :   Successfully uninstalled com.example.mapdemo from abcd1234_TCT_ALCATEL_one_touch_995
[INFO] abcd1234_TCT_ALCATEL_995 :   Successfully installed /dev/foo/target/foo.apk to abcd1234_TCT_ALCATEL_995
[INFO] abcd1234_TCT_ALCATEL_one_touch_555 :   Attempting to start com.example.foo/com.example.foo.MainActivity

Two expressions would be sufficient: One matching by looking for ... Successfully ... and another by ... Attempting ... in the strings.

I want to use it for colorizing the build output of IntelliJ using the GrepConsole plugin.

도움이 되었습니까?

해결책

How about these two simple ones:

.*Successfully.*
.*Attempting.*

You could improve them from there. Adding the : and spaces maybe:

.*:   Successfully.*
.*:   Attempting.*

Edit

Make sure that the pattern is within reach of the search:

enter image description here

It will work:

enter image description here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top