Regex
http://docs.notepad-plus-plus.org/index.php/Regular_Expressions
use '\n' to get the mathcing groups
Another Search Replace Example
[Data]
AS AF AFG 004 Afghanistan
EU AX ALA 248 Åland Islands
EU AL ALB 008 Albania, People's Socialist Republic of
AF DZ DZA 012 Algeria, People's Democratic Republic of
OC AS ASM 016 American Samoa
EU AD AND 020 Andorra, Principality of
AF AO AGO 024 Angola, Republic of
NA AI AIA 660 Anguilla
AN AQ ATA 010 Antarctica (the territory South of 60 deg S)
NA AG ATG 028 Antigua and Barbuda
SA AR ARG 032 Argentina, Argentine Republic
AS AM ARM 051 Armenia
NA AW ABW 533 Aruba
OC AU AUS 036 Australia, Commonwealth of
Final Data:
AS,AF,AFG,004,Afghanistan
EU,AX,ALA,248,Åland Islands
EU,AL,ALB,008,Albania, People's Socialist Republic of
AF,DZ,DZA,012,Algeria, People's Democratic Republic of
OC,AS,ASM,016,American Samoa
EU,AD,AND,020,Andorra, Principality of
AF,AO,AGO,024,Angola, Republic of
NA,AI,AIA,660,Anguilla
AN,AQ,ATA,010,Antarctica (the territory South of 60 deg S)
NA,AG,ATG,028,Antigua and Barbuda
SA,AR,ARG,032,Argentina, Argentine Republic
AS,AM,ARM,051,Armenia
NA,AW,ABW,533,Aruba
OC,AU,AUS,036,Australia, Commonwealth of
# wget
wget <http://localhost:8080/> -UseBasicParsing
wget <http://blog.stackexchange.com/> -OutFile out.html
wget(new-object System.Net.WebClient).DownloadString("<https://www.google.com>") (old)
# tail
Get-Content -Path "C:\\scripts\\test.txt" -Wait
# grep
<https://antjanus.com/blog/web-development-tutorials/how-to-grep-in-powershell/>
<https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/select-string?view=powershell-3.0>
#cat post.md | Select-String -Pattern "^\\w*:"
Select-String -Path *.ts -Pattern "@select"
#List with sort
get-childitem -filter "*.xls" | sort LastWriteTime -Descending |select name
Create images