> For the complete documentation index, see [llms.txt](https://wiki.smhuda.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.smhuda.com/pentesting/infrastructure-security/network-infrastructure/select-all-ip-addresses-in-sublime-text.md).

# Select all IP addresses in Sublime Text

## How to select all IP addresses in Sublime Text

### Regex to select all IP addresses in Sublime Text

{% hint style="info" %}
Taken from <https://denshub.com/sublime-text-select-ip-address/>&#x20;
{% endhint %}

* Open the file containing the IP addresses in [SublimeText](https://www.sublimetext.com/) and go to `Find - Replace...`.
* Make sure you have the RegEx selector enabled - it looks like a `.*` sign next to the search field.
* For IP addresses that look like this: `99.7.83.38` enter the following regex: `\b(\d{1,3}\.){3}\d{1,3}\b`.
* For IP addresses that look like this: `99.61.204.91/32` enter the following regex: `\b(\d{1,3}\.){3}\d{1,3}\/\d+\b`
* Then click the `Find All` button (on the right) and copy them into a single blacklist of IP addresses.
* After that you can leave only unique values. To do this, open the menu `Edit - Permute Lines - Unique`. Depending on the length of the list it may take a few seconds or minutes.
* Save the file and use it for your needs.

PS. [This answer](https://stackoverflow.com/questions/36558590/use-sublimetext-to-delete-all-log-entries-except-ips) about choosing IP addresses is also good.
