Trying to do something in powershell that I just accomplished in linux and trying to see if it is easily done.
I have a page of text and I am trying to pull out two things. Lets just say my script looks like this:
This is my email
This is Test's email
my email is 324@fdaf.com This is my email
that is my email
OK, so I want to txt a big document that looks exactly like this. I want to pull JUST the email out of it. Not the entire line with the email but JUST the email. I also want to get the line before it.
With Linux i did a cut to erase the stuff before and after the email and I grep'd for *@* basically. To get the line before it I used a grep -A1 and it worked. Anyone know if I can do this same thing with powershell and output it to a log file? Thanks for any help!!!
I have a page of text and I am trying to pull out two things. Lets just say my script looks like this:
This is my email
This is Test's email
my email is 324@fdaf.com This is my email
that is my email
OK, so I want to txt a big document that looks exactly like this. I want to pull JUST the email out of it. Not the entire line with the email but JUST the email. I also want to get the line before it.
With Linux i did a cut to erase the stuff before and after the email and I grep'd for *@* basically. To get the line before it I used a grep -A1 and it worked. Anyone know if I can do this same thing with powershell and output it to a log file? Thanks for any help!!!