I have following output from Protractor test and I'm trying to parse and find name of failed spec:
Specs: /var/lib/jenkins-slave/workspace//tests/js/e2e/ui_e2e/tests/test_one.js
Selenium URL: http://10.20.40.54:4444/wd/hub
..... number of different strings here....
Executed 25 of 25 specs SUCCESS in 1 min 23 secs.
-----
Specs: /var/lib/jenkins-slave/workspace//tests/js/e2e/ui_e2e/tests/test_two.js
..... number of different strings here....
UnknownError: Due to a previous error, this job has already finished. You can learn more at
I'm using following regex:
(?:Specs:)(?:[\s\S])*(?=UnknownError(.*?))
However, it matches too wide section from first string, swallowing string with test_two.js
.
How can I avoid swallowing and narrow match to have it like:
Specs: /var/lib/jenkins-slave/workspace//tests/js/e2e/ui_e2e/tests/test_two.js
..... number of different strings here....
UnknownError: Due to a previous error, this job has already finished. You can learn more at