in reply to regular expression

The regex you need depends on what you want to match or extract. By guessing what you want be interested in, I came up with this regex:

$string = "HOST_RESOURCE_MONITOR rtbd:service=ResourceMonitorService +,name=ResourceMonitor,type=HOST true Started 1 day, 12 hours, + 2 minutes, 30 seconds and 476 milliseconds"; if( $string =~ m/ ^HOST_RESOURCE_MONITOR \s+ rtbd: service=(\S+), name=(\S+), type=(\S+) \s+ (\S+) \s+ Started \s+ (\d+) \s+ days? , \s+ (\d+) \s+ hours? , \s+ (\d+) \s+ minutes? , \s+ (\d+) \s+ seconds? \s+ and \s+ (\d+) \s+ milliseconds? /x ) { print <<"HERE"; Service: $1 Name: $2 Type: $3 Boolean: $4 Days: $5 Hours: $6 Minutes: $7 Seconds: $8 Milli: $9 HERE } else { print "No match!\n"; }
--
brian d foy <brian@stonehenge.com>