I have this stored in a text file shown below:
Java 8 Update 111 Java 8 Update 111 (64-bit) Java 8 Update 131 Java 8 Update 151 Java 8 Update 152
I am using PowerShell to do something with this information but struggling at the first hurdle. I am using Select-String
to match a pattern and it isn't working.
Select-String "\\server\JavaVersions.txt" -Pattern "Java 8 Update 111 (64-bit)"
doesn't seem to work but the below brings back both.
Select-String "\\server\JavaVersions.txt" -Pattern "Java 8 Update 111"
Does anyone have any ideas why the one with the brackets in isn't working? Is it parsing issue? I really need to be able to get the (64-bit)
one before the other one and act upon it separately.