I am working on making a bot (I realize this is taboo around here) for my job. I only need assistance with setting up a functional Regular Expression to pull out specific pieces of a wall of text.
Long story short it goes to a website, pulls data about a customer, and pastes it into a chat room for my co-workers, however no one wants to see a HUGE wall of text everytime someone calls for help.
Below is an example of the text it will pull. I've edited out any sensitive information.
I need it to pull the full MAC address, the entire "Current Device Status" line and then the bootfile line.
Now it always shows up in this order and always has each part on it's own line. It won't need to tell me if its green grey or yellow though.
The main issue with Regular Expressions is that I don't know of a way to have it copy an entire line of text into an array.
Thanks in advance guys!
green Health Check Result green CM-00:00:00:00:00 -H2111111111 - SMC Wireless GateWay grey IP Address of Modem 1.1.1.1 green Current CMTS Status ACTIVE grey Current Firmware 0.0.0.0 grey Device Make/Model SMC Networks *Modem # here* grey Device Up Time 1000 Days grey Docsis Capability DOCSIS 3.0 green Downstream Signal Quality (SNR) 0DBm grey Modem Lost Syncs 1 grey Modem Resets 1 green Receive Power Level (downstream) -7.1 Dbmv green Receive Power Level (upstream) 0.0 Dbmv grey Serial Number of the Device H21111111 green Transmit Power Level (upstream) 49.5 Dbmv green Upstream Signal Quality (SNR) 34.8 green Current Device Status 6 (Online) green End of Life Status No green Modem Boot File *bootfilename*