# Update fancy-regex \(\#44120\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/1e4d80a21f6bce80aff18f6d2f1b2ae41f527dc0)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 1e4d80a21f6bce80aff18f6d2f1b2ae41f527dc0

Requested commit: 1e4d80a21f6bce80aff18f6d2f1b2ae41f527dc0

Commit: 1e4d80a21f6bce80aff18f6d2f1b2ae41f527dc0

Tree: d43291eadf0cb650681a8bdef4ea88a58a2cdb37

Author: Conrad Irwin

Committer: GitHub

## Message

```
Update fancy-regex (#44120)

Fancy regex has a max backtracking limit which defaults to 1,000,000
backtracks. This avoids spinning the CPU forever in the case that a
match is taking a long time (though does mean that some matches may be
missed).

Unfortunately the verison we depended on causes an infinite loop when
the backtracking limit is hit
(https://github.com/fancy-regex/fancy-regex/issues/137), so we got the
worse of both worlds: matches were missed *and* we spun the CPU forever.

Updating fixes this.

Excitingly regex may gain support for lookarounds
(https://github.com/rust-lang/regex/pull/1315), which will make
fancy-regex much less load bearing.

Closes #43821

Release Notes:

- Fix a bug where search regexes with look-around or backreferences
could hang
  the CPU. They will now abort after a certain number of match attempts.
```

## Parents

- [f90d9d26a55eb4730cd700c6814c6cee73bd94d7](https://git.cafe/gitcafe/zed/commit/f90d9d26a55eb4730cd700c6814c6cee73bd94d7?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/1e4d80a21f6bce80aff18f6d2f1b2ae41f527dc0?format=markdown)
