# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.smhuda.com/pentesting/infrastructure-security/network-infrastructure/select-all-ip-addresses-in-sublime-text.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
