Select-string exact match
hi
i trying filter out usernames listing select-string -pattern seems matching pattern. wondering if there way exact match?
example
$usr = "jim"
select-string c:\temp\textfile.txt -pattern $usr (and pull whatever in string jim. when finds jimmy not want in string
txt file data example:
jim,123456
jimmy,123
ji,1489
select-string <file> -pattern '^jim,'
\_(ツ)_/
Windows Server > Windows PowerShell
Comments
Post a Comment