I have a string value and wish to get the engineers name only e.g. in this case “CARL HARRISON”.
"{ Engineer = CARL HARRISON, HandHeldAvailability = H, HASHHT = True, HHTSTATUS = }"
The names can be diffrent lenths but will alway be in the same format.
A Regex allows you to verify that the input string matches (Otherwise match.Success will be false) and allows to easily change it in case the input format changes. You can also match the other parts easily as well.
Edit: If you call this function a lot (i.e. in a loop), then you can also compile the Regex: