Page MenuHomePhabricator

Correct an ambiguous regexp in DiffusionRequest
ClosedPublic

Authored by epriestley on Nov 2 2018, 2:56 AM.
Tags
None
Referenced Files
F18964781: D19770.diff
Nov 14 2025, 12:35 PM
F18761172: D19770.id.diff
Oct 6 2025, 12:41 PM
F18673339: D19770.id47227.diff
Sep 25 2025, 10:15 AM
F18568671: D19770.id47229.diff
Sep 10 2025, 12:20 AM
F18568669: D19770.id47227.diff
Sep 10 2025, 12:20 AM
F18509900: D19770.id.diff
Sep 5 2025, 3:40 AM
F18503433: D19770.diff
Sep 4 2025, 11:05 PM
F18292637: D19770.id47227.diff
Aug 23 2025, 12:24 PM
Subscribers

Details

Summary

See https://discourse.phabricator-community.org/t/diffusionrequest-regex-error/2057/.

The intent of [\d-,] is "digits, hyphen, and comma" but [x-y] means "character range x-y".

Specify [\d,-] instead to disambiguate the hyphen as "literal hyphen", not a character range marker.

Test Plan

I can't reproduce the original error as reported, but browsed around Diffusion for a bit.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Nov 2 2018, 3:00 AM
This revision was automatically updated to reflect the committed changes.

Thanks, this is similar to the solution I came up with.