Skip to content
Snippets Groups Projects

search: use non-capturing syntax for fuzzy regex pattern

Merged Administrator requested to merge main-dry-run/rvt/non-capturing-fuzzy-search into main

Created by: rvantonder

Since Code Insights/Compute rely on capture groups to extract values, our previous method of wrapping search terms with just (...) creates capture groups that interfere. Instead we now wrap terms with (?:...) which avoids creating capture groups.

Note that if the pattern is something like (a b) where there's a space inside balanced parens, this space is treated literally because of detection I implemented to tame this sort of manipulation. I.e., there is no danger that the fuzzy regex wrapping (?:...) risks doing something funky like (?:(a).*(?:b))

Toplevel search recognizes (?:...) so this should be semantics preserving for backends.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading