#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)node.*?=(\w+).*?\s(\d+)"
Local $sString = "digraph A {" & @CRLF & _
"rankdir = LR;" & @CRLF & _
"node [shape=circle,style=filled] 0" & @CRLF & _
"node [shape=circle,style=filled] 1" & @CRLF & _
"node [shape=circle,style=filled] 2" & @CRLF & _
"node [shape=circle,style=filled] 3" & @CRLF & _
"node [shape=circle,style=filled] 4" & @CRLF & _
"node [shape=circle,style=filled] 5" & @CRLF & _
"node [shape=circle,style=filled] 6" & @CRLF & _
"node [shape=circle,style=filled] 7" & @CRLF & _
"node [shape=circle,style=filled] 8" & @CRLF & _
"node [shape=circle,style=filled] 9" & @CRLF & _
"node [shape=doublecircle,style=filled] 10" & @CRLF & _
"0 -> 4 [label="g "];" & @CRLF & _
"0 -> 1 [label="b "];" & @CRLF & _
"1 -> 2 [label="o "];" & @CRLF & _
"2 -> 7 [label="y "];" & @CRLF & _
"2 -> 3 [label="o "];" & @CRLF & _
"3 -> 7 [label="k "];" & @CRLF & _
"4 -> 5 [label="i "];" & @CRLF & _
"5 -> 6 [label="r "];" & @CRLF & _
"6 -> 7 [label="l "];" & @CRLF & _
"7 -> 9 [label="<+N:s> "];" & @CRLF & _
"7 -> 8 [label="<+N:0> "];" & @CRLF & _
"8 -> 10 [label="<+Sg:0> "];" & @CRLF & _
"9 -> 10 [label="<+Pl:0> "];" & @CRLF & _
"}"
Local $sSubst = ""
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm