1// [email protected] downloaded from https://ga.jspm.io/npm:[email protected]/index.js 2 3const $="[a-fA-F\\d:]";const boundry=n=>n&&n.includeBoundaries?`(?:(?<=\\s|^)(?=${$})|(?<=${$})(?=\\s|$))`:"";const n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}";const e="[a-fA-F\\d]{1,4}";const t=`\n(?:\n(?:${e}:){7}(?:${e}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:${e}:){6}(?:${n}|:${e}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:${e}:){5}(?::${n}|(?::${e}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:${e}:){4}(?:(?::${e}){0,1}:${n}|(?::${e}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:${e}:){3}(?:(?::${e}){0,2}:${n}|(?::${e}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:${e}:){2}(?:(?::${e}){0,3}:${n}|(?::${e}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:${e}:){1}(?:(?::${e}){0,4}:${n}|(?::${e}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::${e}){0,5}:${n}|(?::${e}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim();const c=new RegExp(`(?:^${n}$)|(?:^${t}$)`);const d=new RegExp(`^${n}$`);const s=new RegExp(`^${t}$`);const ipRegex=$=>$&&$.exact?c:new RegExp(`(?:${boundry($)}${n}${boundry($)})|(?:${boundry($)}${t}${boundry($)})`,"g");ipRegex.v4=$=>$&&$.exact?d:new RegExp(`${boundry($)}${n}${boundry($)}`,"g");ipRegex.v6=$=>$&&$.exact?s:new RegExp(`${boundry($)}${t}${boundry($)}`,"g");export{ipRegex as default}; 4
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.