So I am looking to run a batch file which would extract the value of a particular variable from a string. For Example:
[2017-11-03T12:18:56.263733+00:00] [XFM] [TRACE:1] [EPMHFM-00000] [XFM] [ecid: XDS.0000.0000.0000.0001] [File: CHsvDSSystemInfo.cpp] [Line: 6002] [userId: ] [appName: GGCOST] [pid: 9640] [tid: 6632] [host: AWEU1ORHYAP05P] [nwaddr: 172.20.36.105:0;] [errorCode: 0] [srcException: NotSpec] [errType: 1] [dbUpdate: 1] [11.1.2.4.202.5211] [[SYSINFO:Application=GGCOST; PID=9640; NumUsers=0; CPU(Cores)=8; NumTasks=0; NumErrors=1; PhysicalMem=60129071104; UsedPhysicalMem=38635540480; ProcUsedPhysicalMem=3277619200; VirtualMem=140737488224256; UsedVirtualMem=5590806528; ProcUsedVirtualMem=3582775296; UsedCPU=9.3284; ProcUsedCPU=56.3594; NumCubesInRAM=7007; NumDataRecordsInRAM=1693604; NumRecordsInLargestCube=92334]]
From the above string, I am looking to extract the pid number, which in this case is 6212. Can it be done via a batch script?