Regular Expressions 101

Community Patterns

netBooter Telnet status parser

0

Regular Expression
ECMAScript (JavaScript)

/
\s{2,3}(\d+)\|\s{8,9}(\w+)\|\s{3}(ON\s|OFF)\|(\s+|\s+\w+)\|\s{5}(ON\s|OFF)\n|\s{3}(\d)\s\|\s+(\w+)\s+\|\s+(ON\s|OFF)\|(\s{2}\n|.\w+)|AC current draw\s(\d)\:\s(\d\.\d{2})|Max detected\s(\d\.\d{2})
/
g

Description

This Regex will parse the status output of netBooter type internet connected power switches.

Submitted by anonymous - 7 years ago