summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-06-09 12:03:59 +0200
committerGitHub <noreply@github.com>2022-06-09 12:03:59 +0200
commite56a072fa73ec6dc717569a169c532e07443d782 (patch)
treedb2b39636dd2a027f134ad15942777621bb43cbe /core
parent211361da2f14c8d8ae1c1411e86c209ac71a0a32 (diff)
parent78786a2887801ffa91fe762c022ea512b06a4fb9 (diff)
downloadnextcloud-server-e56a072fa73ec6dc717569a169c532e07443d782.tar.gz
nextcloud-server-e56a072fa73ec6dc717569a169c532e07443d782.zip
Merge pull request #32769 from nextcloud/enh/32749/regex-universal-search
Specify the filter first for unified search
Diffstat (limited to 'core')
-rw-r--r--core/src/services/UnifiedSearchService.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/services/UnifiedSearchService.js b/core/src/services/UnifiedSearchService.js
index 9d0bf84d58f..f365a378e0c 100644
--- a/core/src/services/UnifiedSearchService.js
+++ b/core/src/services/UnifiedSearchService.js
@@ -31,8 +31,8 @@ export const defaultLimit = loadState('unified-search', 'limit-default')
export const minSearchLength = loadState('unified-search', 'min-search-length', 2)
export const enableLiveSearch = loadState('unified-search', 'live-search', true)
-export const regexFilterIn = /[^-]in:([a-z_-]+)/ig
-export const regexFilterNot = /-in:([a-z_-]+)/ig
+export const regexFilterIn = /(^|\s)in:([a-z_-]+)/ig
+export const regexFilterNot = /(^|\s)-in:([a-z_-]+)/ig
/**
* Create a cancel token