File path regex for Advanced Global Search Elasticsearch indexing is slow
Possibly the cause of gitlab-com/gl-infra/production#2318 (closed) we can see from gitlab-com/gl-infra/production#2318 (comment 367588644) that the regex responsible for pulling apart file path segments introduced in !5138 (merged) has catastrophic backtracking and this could be the cause of high CPU on one of our nodes.
We need to replace this regex with something that will also work for path segments so that file names are still easily searchable but does not have this problem.