Find characters between single quotes ‘

$string = "'LastName',  ([samaccountname])"
[Regex]::Matches($string, "(?<=\')(.*?)(?=\')").Value
Details
Uses a regex expression with find all characters that match the expression.

Example
PS C:\> $string = "'LastName',  ([samaccountname])"
>> [Regex]::Matches($string, "(?<=\')(.*?)(?=\')").Value

LastName