regex - FINDSTR command in a batch file to display variable output -


I was thinking that someone might help me write a relatively simple batch file command, which I used to use in my remaining Based on the batch file off of off I work in a support group which supports many products and is one of the specific ones that I only have one that understands XML config files. The following is what I am trying to do: Here is a quote from the config file:

     

Whatever I am trying to do is to create some GUI (batch file) that the user can run. On running the batch file, the user will be prompted to enter the name of the file. In this example, the name of the file is the importer. Config I want to search batch file for string

     

I want to take the value between the quote mark "e" in this case and give some output in the DOS window so that the user can know that this component is in the metadata embedded file name, of course, If the value is F, then this component uses metadata from a flat file .... I just want to change the user instead of searching through this large config file instead of searching because they never Finding

Anyone who can help will be great help because it will be the basis of my rest code to show the values ​​of my users. I have thought that it is best to use regular expressions and FINDSTR, but I have tried many things and it has difficulty working.

Something like this: (? & Lt; = & lt; add key = "metadata type" value = ") \ w

This string will be required and then assumes (in this case e) ... I do not know how to write where to store it or how to output it to something else .... any help Regex support for FINDSTR is severely limited, and what is it like you do!

help findstr or findstr / from the command window. I also recommend reading. Regex Audiatti's description is towards the lower part of the north. .

You can use a Windows version such as awk, grep, sed or pearl. Or you can use VBScript or JScript NG XML is a nightmare with the Parsi original batch. You can try something like the following: This is not very strong, but it will work in most cases:

  @echo closed sitelock enabledDelived Expansion / F. "Delay =" %% A ('Searchr / RC:' \ & lt; Set = "\" [\ "\"] metadata type [\ "\"] value = [\ "\"] "fileName.txt" ') Set "ln = %% A" set ^ "ln =! Ln : * "Set the value for" metadata type "value =!" To / f delims ^ = ^ ^ ^ "%% ("! Ln! ") = %% A resonance value =! Value!  < / Pre>  

Comments