$f = 'c:\xampp\htdocs\Health_link\index.php'
$t = [IO.File]::ReadAllText($f)

$start = $t.IndexOf('flex-wrap:wrap') - 50
# find end: after second </div> closing the watch div
$end = $t.IndexOf('</div>' + "`n    </div>" + "`n`n    <!-- Kiosk Im", $start)
# simpler: find '<!-- Kiosk Im' and go back
$kioskComment = $t.IndexOf('<!-- Kiosk Im')
# the buttons block ends just before </div>`n    </div>`n`n    <!-- Kiosk
$endBlock = $t.LastIndexOf('</div>', $kioskComment - 5) + 6

Write-Host 'start:' $start 'endBlock:' $endBlock
Write-Host $t.Substring($start, $endBlock - $start)
