Try like this, it just needs a change in the Name parameter value and the RegEx pattern for the match operator.
$VCenterServer=server
$VMCluster="Production"
Connect-ViServer$VCenterServer
# Stick current DRS rules into an array
$DrsRules=Get-DrsRule-Cluster$VMCluster
Get-Cluster$VMCluster|Get-VM-Name'*[ab]v'|
Group-Object-Property {$_-match"(?<name>.*)[a|b]v"; $Matches["name"]} |
Where-Object {$_.Count -eq2} |
ForEach-Object {
if($DrsRules.name -notcontains$_.Values[0][1]){
New-DrsRule-Cluster$VMCluster-Name$_.Values[0][1]-KeepTogether$false-VM$_.Group
}
}