Search in paragraph's text: Difference between revisions
Content added Content deleted
(verify the presence of a word or regular expression within several paragraphs of text (structured or not)) |
(verify the presence of a word or regular expression within several paragraphs of text (structured or not)) |
||
Line 5: | Line 5: | ||
So here, let’s imagine that we are trying to verify the presence of a keyword "SystemError" within the paragraphs "Traceback (most recent call last):" in the file Traceback.txt |
So here, let’s imagine that we are trying to verify the presence of a keyword "SystemError" within the paragraphs "Traceback (most recent call last):" in the file Traceback.txt |
||
<pre> |
|||
cat Traceback.txt : |
cat Traceback.txt : |
||
Line 75: | Line 76: | ||
reason = 'Unable to complete Sysinfo operation. Please see the VMkernel log file for more details.: Sysinfo error: Bad parameterSee VMkernel log for details.' |
reason = 'Unable to complete Sysinfo operation. Please see the VMkernel log file for more details.: Sysinfo error: Bad parameterSee VMkernel log for details.' |
||
} |
} |
||
</pre> |
|||
The expected result must be (with ---------------- for paragraphs matched's sep) : |
The expected result must be (with ---------------- for paragraphs matched's sep) : |
||
<pre> |
|||
Traceback (most recent call last): |
Traceback (most recent call last): |
||
vmodl.fault.SystemError: (vmodl.fault.SystemError) { |
vmodl.fault.SystemError: (vmodl.fault.SystemError) { |
||
Line 110: | Line 112: | ||
} |
} |
||
---------------- |
---------------- |
||
</pre> |