Zend certified PHP/Magento developer

Extract variable names from .txt file with RegEx

I want to extract a variable name (e.g. $00incomplete_frame) from a text file and place the names in a variable for use in PowerShell.
The source variable names do not contain spaces. A source file line will contain the variable name more than once, but I only need the variable name once. I tried:

$variable_names = @()
$samples = Get-Content C:<path to file>code_clip.txt
foreach ($line in $samples) {$variable_names += (-$(w+|d+)){1} }
$variable_names.length
$variable_names

What is wrong with the RegEx?

Thanks