diff --git a/src/core/operations/ExtractIPAddresses.mjs b/src/core/operations/ExtractIPAddresses.mjs index d337e80e..b74ec8fe 100644 --- a/src/core/operations/ExtractIPAddresses.mjs +++ b/src/core/operations/ExtractIPAddresses.mjs @@ -21,7 +21,7 @@ class ExtractIPAddresses extends Operation { this.name = "Extract IP addresses"; this.module = "Regex"; - this.description = "Extracts all IPv4 and IPv6 addresses.

Warning: Given a string 710.65.0.456, this will match 10.65.0.45 so always check the original input!"; + this.description = "Extracts all IPv4 and IPv6 addresses.

Warning: Given a string 1.2.3.4.5.6.7.8, this will match 1.2.3.4 and 5.6.7.8 so always check the original input!"; this.inputType = "string"; this.outputType = "string"; this.args = [ diff --git a/tests/operations/tests/ExtractIPAddresses.mjs b/tests/operations/tests/ExtractIPAddresses.mjs index baa6056a..13922e64 100644 --- a/tests/operations/tests/ExtractIPAddresses.mjs +++ b/tests/operations/tests/ExtractIPAddresses.mjs @@ -85,6 +85,28 @@ TestRegister.addTests([ }, ], }, + { + name: "ExtractIPAddress silly example", + input: "710.65.0.456", + expectedOutput: "", + recipeConfig: [ + { + "op": "Extract IP addresses", + "args": [true, true, false, false, false, false] + }, + ], + }, + { + name: "ExtractIPAddress longer dotted decimal", + input: "1.2.3.4.5.6.7.8", + expectedOutput: "1.2.3.4\n5.6.7.8", + recipeConfig: [ + { + "op": "Extract IP addresses", + "args": [true, true, false, false, false, false] + }, + ], + }, { name: "ExtractIPAddress octal valid", input: "01.01.01.01 0123.0123.0123.0123 0377.0377.0377.0377",