This visionary Dart program contains zero errors and warnings. This code has associated html and css.
Find this at dartpad.dartlang.org/?source=5ecece82-2171-40cb-b465-eaeb494e3e71.
Created with <3 with dartpad.dartlang.org.
This visionary Dart program contains zero errors and warnings. This code has associated html and css.
Find this at dartpad.dartlang.org/?source=5ecece82-2171-40cb-b465-eaeb494e3e71.
Created with <3 with dartpad.dartlang.org.
void main() { | |
/// | |
/// sample using regexp to parse log | |
/// | |
RegExp regExp = new RegExp(r"^(.*m)(\d{1,2}:\d{1,2}:\d{1,2},\d{1,3}) ([^\s]+) (.*)"); | |
var input =""" | |
[0m[31m22:25:57,366 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."bad.war" | |
"""; | |
var matches = regExp.allMatches(input); | |
Match match = matches.elementAt(0); | |
match.groupCount; | |
print(match[1]); | |
print(match[2]); | |
print(match[3]); | |
print(match[4]); | |
} |