update regex catch special version
This commit is contained in:
parent
6022621b44
commit
b1864b02a8
|
|
@ -1,15 +1,14 @@
|
|||
import Env from "@ioc:Adonis/Core/Env";
|
||||
import fs from "fs";
|
||||
import chokidar from "chokidar";
|
||||
import moment from "moment";
|
||||
import KeyValue from "App/Models/KeyValue";
|
||||
import LogDetectFile from "App/Models/LogDetectFile";
|
||||
import LogReport from "App/Models/LogReport";
|
||||
import KeyValue from "App/Models/KeyValue";
|
||||
import Database from "@ioc:Adonis/Lucid/Database";
|
||||
import { sendMessToZulip } from "./sendMessToZulip";
|
||||
import { getListLineByItem } from "./getListLineByItem";
|
||||
import { checkIndexSN } from "./checkIndexSN";
|
||||
import chokidar from "chokidar";
|
||||
import fs from "fs";
|
||||
import { DateTime } from "luxon";
|
||||
import moment from "moment";
|
||||
import { checkIndexSN } from "./checkIndexSN";
|
||||
import { getListLineByItem } from "./getListLineByItem";
|
||||
import { sendMessToZulip } from "./sendMessToZulip";
|
||||
export async function runtimeCheckLogs(folderPath) {
|
||||
try {
|
||||
let fileList = Array();
|
||||
|
|
@ -36,11 +35,11 @@ export async function runtimeCheckLogs(folderPath) {
|
|||
|
||||
const checkSpecialVersion = (paragraph) => {
|
||||
try {
|
||||
const regex = /\(CAT3K_CAA-UNIVERSALK9-M\), Version 16\.9\.[2-9]/;
|
||||
const regex = /\(CAT[1-9]K.*Version 16\.9\.[2-9]/;
|
||||
const regex1 =
|
||||
/\(CAT3K_CAA-UNIVERSALK9-M\), Version 1[7-9]\.[0-9]\.[0-9]/;
|
||||
/\(CAT[1-9]K.*Version 1[7-9]\.[0-9]\.[0-9]/;
|
||||
const regex2 =
|
||||
/\(CAT3K_CAA-UNIVERSALK9-M\), Version [2-9][0-9]\.[0-9]\.[0-9]/;
|
||||
/\(CAT[1-9]K.*Version [2-9][0-9]\.[0-9]\.[0-9]/;
|
||||
// Use the regular expression to find the match
|
||||
const match = paragraph.match(regex);
|
||||
const match1 = paragraph.match(regex1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue