PowerShell: Single Quoted String

By Xah Lee. Date: . Last updated: .

Single Quoted (Verbatim String)

Character sequence between APOSTROPHE ' is verbatim string.

$x = 'some
thing'

Write-Host $x

How to Embed a APOSTROPHE

To include a APOSTROPHE inside APOSTROPHE quoted string, use two APOSTROPHE.

'don''t'
# don't

PowerShell, string and regular expression