From 06bf246afee818eec69658064f586849da33d7f9 Mon Sep 17 00:00:00 2001 From: Jami Cogswell Date: Sun, 16 Apr 2023 16:10:23 -0400 Subject: [PATCH] QL: update regexes --- ql/ql/src/codeql_ql/ast/Ast.qll | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ql/ql/src/codeql_ql/ast/Ast.qll b/ql/ql/src/codeql_ql/ast/Ast.qll index 818828d44fe3..630b07bd6801 100644 --- a/ql/ql/src/codeql_ql/ast/Ast.qll +++ b/ql/ql/src/codeql_ql/ast/Ast.qll @@ -211,17 +211,17 @@ class QueryDoc extends QLDoc { /** Gets the @name for the query */ string getQueryName() { - result = this.getContents().regexpCapture("(?s).*@name ([\\w-\\s]+)(?=\\n).*", 1) + result = this.getContents().regexpCapture("(?s).*@name (.+?)(?=\\n).*", 1) } /** Gets the id part (without language) of the @id */ string getQueryId() { - result = this.getContents().regexpCapture("(?s).*@id (\\w+)/([\\w\\-]+)\\s.*", 2) + result = this.getContents().regexpCapture("(?s).*@id (\\w+)/([\\w\\-/]+)\\s.*", 2) } /** Gets the language of the @id */ string getQueryLanguage() { - result = this.getContents().regexpCapture("(?s).*@id (\\w+)/([\\w\\-]+)\\s.*", 1) + result = this.getContents().regexpCapture("(?s).*@id (\\w+)/([\\w\\-/]+)\\s.*", 1) } }