For example, there is a string like
"\"C:\\Program Files (x86)\\Microsoft Office\\Office15\\POWERPNT.EXE\" \"C:\\Users\\Test\\AppData\\Local\\Microsoft\\Windows\\INetCache\\1234\\Презентация.pptx\" /ou \"\"" Is there some general way to extract entities from it that are file names? I tried to use regulars, but the gaps in the path confuse them. For example:
^(?:[a-zA-Z]\:|\\\\[\w\.]+\\[\w.$]+)\\(?:[\w]+\\)*\w([\w.])+ Works for simple cases, but not for the example described above. Perhaps, there is some kind of library for Go for such tasks, or you can somehow tweak my regular calendar.
\w. so first carefully parse the parameters, dividing them into spaces, of course without considering the spaces inside the quotes. And then among the parameters to look for something similar to the path - MikePOWERPNT.EXEalso a file. - Ainar-G 5:06