Question: I have this piece of code:

```none
<a href="http://www.fnac.pt/Memorial-do-Convento-Texto-em-Analise-Varios/a242166" class="fontbigger">Memorial do Convento - Texto em Análise</a>

```

...and I want to get this part:

```none
Memorial do Convento - Texto em Análise

```

How do I do it? I have tried this:

```none
<a href="[^<]+" class=".+">(.+)</a>

```

...but the first `[^<]` doesn't work cause it recognizes only this:

```none
http://www.fnac.pt/Memorial-do-Convento-Texto-em-Analise-Varios/

```

Answer: 
I use this code to get all my ARM VMs, their private IP address and allocation method, it works across resource groups.

```
$vms = get-azurermvm
$nics = get-azurermnetworkinterface | where VirtualMachine -NE $null #skip Nics with no VM

foreach($nic in $nics)
{
    $vm = $vms | where-object -Property Id -EQ $nic.VirtualMachine.id
    $prv =  $nic.IpConfigurations | select-object -ExpandProperty PrivateIpAddress
    $alloc =  $nic.IpConfigurations | select-object -ExpandProperty PrivateIpAllocationMethod
    Write-Output "$($vm.Name) : $prv , $alloc"
}

```

Sample Output:  

proddc : 10.0.0.4 , Static  

stagedc : 10.1.0.4 , Static
I have searched a lot and finally succeeded. Using resource group name and azure vm name, you can retrieve private or public ip address:

```
$Resourcegroup=""

$VmName=""

$VmNetworkdetails= (((Get-AzureRmVM -ResourceGroupName $Resourcegroup -Name $VmName).NetworkProfile).NetworkInterfaces).Id

$nicname = $VmNetworkdetails.substring($VmNetworkdetails.LastIndexOf("/")+1)

$privateIp =(Get-AzureRmNetworkInterface -Name $nicname -ResourceGroupName $Resourcegroup)|Select-Object -ExpandProperty IPConfigurations 

write-host $privateIp.PrivateIpAddress

```