Skip to content

Commit

Permalink
Improve docs for using auto_review regular expressions
Browse files Browse the repository at this point in the history
Suggest using `[\S\s]*` instead of `(?s)`.
  • Loading branch information
perlpunk committed Sep 25, 2023
1 parent 7436568 commit 9b5ee2d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The search terms are crosschecked against the logfiles and
"reason" field of the openQA jobs. A multi-line search is possible, for
example using the `<search_term>`

`(?s)something to match earlier.*something to match some lines further down`
`something to.*match earlier[\S\s]*something to match some lines further down`

Other double quotes in the subject line than around the search term should be
avoided. Also **avoid generic search terms** to prevent
Expand Down Expand Up @@ -68,9 +68,10 @@ for example to look for ticket 12345 call `openqa-query-for-job-label poo#12345`
```

*Notes:* the regex used in `<search_term>` is very powerful but also can be
expensive when `(?s)` is used. Every `.*` can span over multiple lines and
that involves a lot of backtracking and might not be needed. Use `[^\n]*` over
`.*` where possible or use line spanning matches like `[\S\s]*`.
expensive when `(?s)line1.*line2.*line3` is used. Every `.*` can span over
multiple lines and that involves a lot of backtracking and might not be needed.
Use `[^\n]*` over `.*` where possible or use line spanning matches with
`[\S\s]*` instead of `(?s)`.

### Unknown issues

Expand Down

0 comments on commit 9b5ee2d

Please sign in to comment.