I need to pull the value that is between two characters in a text file. For example, the contents of my text file are:
I want to pull the value
between the pounds. The value is #456#.
How can I grab the "456" value? As close as I've gotten is using the select-string statemnt I can get the entire line that includes the value, but I cannot get just that value.
My select-string statement is $str = Select-String -Pattern "#(.*)#" c:\testparse.text
Any help would be greatly appreciated.