什么是匹配以下字符串的正则表达式?
[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
两个表达式就足够了:通过在字符串中查找... Successfully ...
和另一个... Attempting ...
进行匹配。
我想使用colorizing the build output of IntelliJ将其用于GrepConsole plugin。
答案 0 :(得分:1)
这两个简单的怎么样:
.*Successfully.*
.*Attempting.*
你可以从那里改进它们。添加:
和空格可能是:
.*: Successfully.*
.*: Attempting.*
修改强>
确保模式在搜索范围内:
它会起作用: