Extract specific data from a text file
so if orignal file 4000 page text file 200 email addresses in on random pages, , wanted extract 200 email addresses. how can wps spit out email addresses text file?
i have used command select-string "@" .\groupmemo.txt, not return email addresses , there no other instances of "@" sign in text file. what going wrong?
thanks
using regex pull
$file = get-content "location of file" (select-string -inputobject $file -pattern '\w+@\w+\.\w+' -allmatches).matches | select value
thanks azam when see answers please mark answer if helpful..vote helpful.
Windows Server > Windows PowerShell
Comments
Post a Comment