PowerShell: Here-String
Here-string (aka heredoc) is a convenient syntax for quoting long multi-lines text. There are two syntaxes.
Use single quote if you want everything literal.
$x = @' long string here. everything is literal variable $n are not intepreted can contain many quotes "" '' tick ` or slashes / \ '@
Use double quote if you want $ variable or expression expanded:
$x = @" long string here may have multiple lines some variable $n cats can contain many quotes "" '' tick ` or slashes / \ "@
The beginning and end quotation syntax must be on their own lines.
PowerShell String
- PowerShell: Quote String
- PowerShell: Double Quoted String, String Expansion
- PowerShell: Here-String
- PowerShell: Escape Characters
- PowerShell: String Operators
- PowerShell: Join String
- PowerShell: Split String
- PowerShell: Format String
- PowerShell: String Methods
- PowerShell: String Wildcards
- PowerShell: Regular Expression Operators
- PowerShell: Regular Expression Syntax