Sonar: Replacing string.match(regexp) with regexp.exec(string)

This commit is contained in:
koloml committed 2026-06-14 03:19:54 +04:00
1 parent ed3db1240c
commit 3404877091
1 file changed
+1 -1
+1 -1
View File
@@ -189,7 +189,7 @@ export class QueryLexer {
*/
#matchAt(targetRegExp: RegExp, index: number, resultCarrier: MatchResultCarry = {}): resultCarrier is SuccessfulMatchResultCarry {
targetRegExp.lastIndex = index;
resultCarrier.match = this.#value.match(targetRegExp);
resultCarrier.match = targetRegExp.exec(this.#value);
return resultCarrier.match !== null;
}