I don't know if this is a pcre question or PB question.
here's regex101's take on it. (hint: look at 'match information')
Code: Select all
CreateRegularExpression(0,"^FWD:\[(?<pid>[0-9]{4})\] (?<prog>.+\.exe): (?<msg>.*)$")
x$ = "FWD:[1234] something else.exe: a bunch of text"
If MatchRegularExpression(0,x$)
Debug RegularExpressionNamedGroup(0,"pid")
Debug RegularExpressionNamedGroup(0,"prog")
Debug RegularExpressionNamedGroup(0,"msg")
Else
Debug "No match"
EndIf