This is a real world problem.
I need to check the status of power supplies.
An example of the data .... Note when quoted here the leading white space on the lines Fan.* through Thermal.* are stripped.
Quote:
SYS PS1 is present.
Fan status: Normal
Input Voltage status: Normal
DC Output Voltage status: Normal
Type: AC
Thermal status: Normal
SYS PS2 is absent.
|
The RE Im using .. its just ugly
Code:
\s+Fan.*:\sNormal\s+Input.*:\sNormal\s+DC.*:\sNormal\s+Type.*\s+Therm.*:\sNormal
Is there a better way to do this ?