$js = Get-Content js\main.js -Raw
$pattern = "id:\s*'([^']+)'[\s\S]*?title:\s*'([^']+)'[\s\S]*?hero:\s*'([^']+)'"
$matches = [regex]::Matches($js,$pattern)
$out='tours_list.txt'; '' | Out-File $out -Force
foreach($m in $matches){ $id=$m.Groups[1].Value; $title=$m.Groups[2].Value; $hero=$m.Groups[3].Value; "$id|$title|$hero" | Out-File $out -Append }
Write-Output "Wrote $out with $($matches.Count) entries"