There are a couple of ways to do this.
The best option is filtering in the "List of Assets" action, so you only get the assets whose name is an IP address. Just one consideration, as you are passing a string, you need to escape special characters. But in this case, you'll need to escape them twice. For example, if your expression contains "\.", you should write "\\\\.". Here is a code example:
{
conjunction: OR,
conditions: [
{
path: "assetBasicInfo.name",
operator: REGEXP,
value: "^[0-9]{1,3}\\\\.[0-9]{1,3}\\\\.[0-9]{1,3}\\\\.[0-9]{1,3}$"
}]
}
Another option is using the "Filter" action after a "List of Assets" action. In this case, you'll get all the assets in the first step, and will filter that list in the second step. Here, as you are using Javascript code, you can add forward slashes at the beginning and the end of the regular expression, so you don't need to escape characters. Example:
(item, index) => {
const IpRegex = /^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/;
return IpRegex.test(item.assetBasicInfo?.name);
}
You can test your regular expressions here (remember to select the RE2 syntax) : https://regex101.com/