Skip to content

Commit 85db3be

Browse files
committed
fix the regex so that its also excludes the brackets
1 parent 5b788e5 commit 85db3be

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

components/student.component.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,10 @@ const getStudentDetails = async (email) => {
154154
const sessionName = sessionData[i].Session_Name;
155155
let newString = sessionName;
156156
let regexString = wordsToRemove.join("|");
157-
let regex = new RegExp("\\b(" + regexString + ")\\b|\\d+|&", "gi");
157+
let regex = new RegExp(
158+
"\\b(" + regexString + ")\\b|\\d+|&|\\(|\\)",
159+
"gi"
160+
);
158161
newString = newString.replace(regex, "");
159162
finalWeeklyQuizzes.push({
160163
...sessionData[i],

0 commit comments

Comments
 (0)