I feel you on the regex struggles! For ip extract from txt, I’ve had good luck with PowerShell on Windows. You can use a script like this:
```powershell
Select-String -Path "*.txt" -Pattern "\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b" -AllMatches | ForEach-Object { $_.Matches.Value } | Sort-Object -Unique
```
It’s not the prettiest, but it’s fast and gets the job done. Plus, you can tweak it to handle other stuff like sorting or exporting to a CSV.
```powershell
Select-String -Path "*.txt" -Pattern "\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b" -AllMatches | ForEach-Object { $_.Matches.Value } | Sort-Object -Unique
```
It’s not the prettiest, but it’s fast and gets the job done. Plus, you can tweak it to handle other stuff like sorting or exporting to a CSV.
