diff --git a/models/boards.js b/models/boards.js
index 8db0f34bd..01770f872 100644
--- a/models/boards.js
+++ b/models/boards.js
@@ -1263,12 +1263,12 @@ function boardRemover(userId, doc) {
}
Boards.uniqueTitle = title => {
- const m = title.match(/^(?
.*?)\s*(\[(?\d+)]\s*$|\s*$)/);
+ const m = title.match(`/^(?.*?)\s*(\[(?\d+)]\s*$|\s*$)/`);
const base = escapeForRegex(m.groups.title);
let num = 0;
Boards.find({ title: new RegExp(`^${base}\\s*\\[\\d+]\\s*$`) }).forEach(
board => {
- const m = board.title.match(/^(?.*?)\s*\[(?\d+)]\s*$/);
+ const m = board.title.match(`/^(?.*?)\s*\[(?\d+)]\s*$/`);
if (m) {
const n = parseInt(m.groups.num, 10);
num = num < n ? n : num;