Skip to content

Commit

Permalink
RegExp now matches words starting with "æøå" (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
yelodevopsi authored Oct 20, 2023
1 parent 1dd7681 commit 6c71b0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/components/FilteredConsultantsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function filterConsultants(
var newFilteredConsultants = consultants;
if (search && search.length > 0) {
newFilteredConsultants = newFilteredConsultants?.filter((consultant) =>
consultant.name.match(new RegExp(`\\b${search}.*\\b`, "gi")),
consultant.name.match(new RegExp(`(?<!\\p{L})${search}.*\\b`, "giu")),
);
}
if (filter && filter.length > 0) {
Expand Down

0 comments on commit 6c71b0a

Please sign in to comment.