We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0ffac77 commit ffdd20bCopy full SHA for ffdd20b
Phonebook.Frontend/src/app/modules/table/table-logic.ts
@@ -91,12 +91,13 @@ export class TableLogic {
91
92
/**
93
* Prepares the Search String by
94
- * 1. Removing Spaces and Commas
95
- * 2. Escaping RegEx Characters
+ * 1. Removing Commas
+ * 2. Trimming whitespace
96
+ * 3. Escaping RegEx Characters
97
* @param str String to prepare
98
*/
99
public static prepareSearchString(str: string): RegExp {
- return TableLogic.escapeRegExp(str.replace(/[\s,]/g, ''));
100
+ return TableLogic.escapeRegExp(str.replace(/,/g, '').trim());
101
}
102
103
0 commit comments