Are there other possible email subject formats?
Are your sales orders always 7 digits?
You could use something like this:
var text string = [Subject];
//If the end of the string is a bracket, take the number from within the bracketsIf(Right($String,1)=")",NotRight(NotLeft($String,"("),")")
//Otherwise, take whatever is right of the last spaceRight($String," ")
I haven't tested it, but something like that should work.