A few comments. First, WMI queries like this can take a while. It's usually more efficient to perform more specific WMI query, so moving your "*555555*" filter to the Get-WMIObject cmdlet. You can read more about WMI & PowerShell
here.
Second, there's easier ways of working with AD groups. I'd suggest either
the Quest cmdlets or the PowerShell V2 Active Directory cmdlets (which require 2008R2 ADWS be setup). Those ship with 2008 R2 or for W7, I think you get them with the RSAT feature.
Sometimes, you really do need to parse text like you are trying to do. But with PowerShell, you if you can work with objects, you should, because it's always going to be easier. When you really do need to go there, I'd use either the Split operator, or regular expressions with the Match operator. The technique depends on the text and how much time you have. If you know awk, I'm sure you know regex to some extent, so you may want to go that route.