You would need to reconsider your regular expression for field extraction. Assuming msg field contains the reason information that you want to extract:
<Your Base Search>
| rex field=msg "reason\\\"\=\\(?<reasonCode>\w+)\\\"(?<newmsg>\w+)\\\"\,"
| table appname, time, source_instance, msg, newmsg
| sort appname, time, source_instance, newmsg
If msg field does not have the reason as expected, you can replace msg with _raw i.e.
| rex field=_raw "reason\\\"\=\\(?<reasonCode>\w+)\\\"(?<newmsg>\w+)\\\"\,"
PS: Ideal you should move this to Field Extraction using Extract New Fields in Splunk Search or through Props.conf, once you have established that the regular expression is working as expected. For quick hints/testing regular expressions you can try regex101.
... View more