Hello,

I'm trying to create an environment variable by parsing a very ugly XML file returned by a curl command. Contained in the XML is a MAC address that I'm trying to use FINDSTR to find and then SET it as an environment variable for the local user.

Here is a snippet of the XML that the curl command returns:

<CameraStatusModel xmlns="***URL contains sensitive info, so removed it***"> <CameraStatusModel.ActiveCamera> <RectilinearCameraDeviceModel CompassHeading="0" IsConfigured="False" MACAddress="00:30:53:27:27:f4" Make="Basler" Name=""> <RectilinearCameraDeviceModel.CalibrationMask> <RectilinearCalibrationMaskModel Id="a1155f60-2900-442c-82a8-6c00dadbf243" Length="0" Width="0" ></RectilinearCalibrationMaskModel>

I think the FINDSTR command I need to use is: FINDSTR /r [a-z0-9]{2}:[a-z0-9]{2}:[a-z0-9]{2}:[a-z0-9]{2}:[a-z0-9]{2}:[a-z0-9]{2} c:\Users\<MyUsername>\Desktop\sandbox\output.txt. I also know that I can use SET cameraMAC=<something> to create the environment variable, which I can confirm using ECHO %cameraMAC%. What I don't know is how I can get the FINDSTR to be assigned to the SET command.

Any suggestions would be appreciated. Thank you.