You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However if string modified to '\\msvc\\' to search msvc between backslashes, \' at end considered as escape for single quote and throws error. Please help.
The text was updated successfully, but these errors were encountered:
The reason it's failing when you add \\ to the end of the msvc is because of how it's getting rendered at the jmespath level. When you have two escapes it gets resolved to a single \, and you see in the error that there is only a single escape right after the \msvc
So you need to double the number of backslashes to acount for this: once for the scripting or templating language and once for the JMESPath evaluation. This will work if you change your jmespath query to "[? !contains(FullName,'\\msvc\\\\')].{FullName: FullName, FileVersionRaw: VersionInfo.FileVersionRaw}"
Below is the JSON output text from a command, trying to fetch FullName and FileVersionRaw where FullName not contains '\msvc\'
Below code produces result as we search only for string '\\msvc' which starts with backslash
Result output:
However if string modified to '\\msvc\\' to search msvc between backslashes, \' at end considered as escape for single quote and throws error. Please help.
The text was updated successfully, but these errors were encountered: