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

Popular posts from this blog

CRL Revocation always failed

Failed to query the results of bpa xpath

0x300000d errors in Microsoft Remote Desktop client