Get all Text before a character

$string = "[email protected]"
$string.Substring(0,$string.IndexOf("@"))
Details
Uses a substring and IndexOf to break apart the string

Example
PS C:\> $string = "[email protected]"
>> $string.Substring(0,$string.IndexOf("@"))

john.doe