mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 00:40:10 +00:00
Fix Regex escape
This commit is contained in:
parent
68c620d3c1
commit
c79a657e5c
3 changed files with 21 additions and 21 deletions
|
|
@ -2,6 +2,7 @@ import NtopUtils from "./ntop-utils.js";
|
|||
|
||||
const Utils = NtopUtils;
|
||||
function get_data_pattern(type) {
|
||||
console.log(Utils.REGEXES["email"]);
|
||||
if (type == "text") {
|
||||
return `.*`;
|
||||
} else if (type == "vlan") {
|
||||
|
|
@ -19,9 +20,7 @@ function get_data_pattern(type) {
|
|||
let ipv4_cidr_vlan = r_ipv4.replace("$", `${network_ipv4}${vlan}$`);
|
||||
let network_ipv6 = String.raw`(\/(([1-9])|([1-9][0-9])|(1[0-1][0-9])|(12[0-8])))`;
|
||||
let ipv6_cidr = r_ipv6.replaceAll("$", `${network_ipv6}$`);
|
||||
console.log(ipv6_cidr);
|
||||
let ipv6_cidr_vlan = r_ipv6.replaceAll("$", `${network_ipv6}${vlan}$`);
|
||||
// return `(${ipv4_cidr}|${ipv4_cidr_vlan}|${ipv6_cidr})`;
|
||||
return `(${ipv4_cidr}|${ipv4_cidr_vlan}|${ipv6_cidr}|${ipv6_cidr_vlan})`;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue