I hope you and yours are doing ok in these trying times.
Making a skin to control my 3D printer over WiFi via a ESP2866 module.
I am using WebParser to send the requests and receive the string value.
And i am able to do things like movement, extrude plastic, change color of Neopixel RGB strips and set temperatures.
But when i poll for temperatures they arrive as a single string "value".
Current nozzle temp, target nozzle temp, Current bed temp, target bed temp.
Return string: ok T:20.16 /0.00 B:20.62 /0.00 @:0 B@:
I then need to seperate the temperatures so i can format the text as i need for the skin.
Had some luck using RegExpSubstitute to format the text.
But after several days of research and poking at it, i must give in and ask for guidance.
Used this cheat sheet: https://www.debuggex.com/cheatsheet/regex/pcre
Code: Select all
[mTemp]
Measure=WebParser
URL=http://#ESPIP#/command?commandText=M105
RegExp=(?siU)ok T:(.*) B@:
UpdateRate=5
Substitute="":"Printer Offline"
[mTempSlit1]
Measure=String
String=ok T:20.16 /0.00 B:20.62 /0.00 @:0 B@:
;[mTemp]
RegExpSubstitute=1
Substitute="^(.{1,}).\d\d\s(.{1,})+$":"\1"