Page MenuHomePhabricator

Correct an ambiguous regexp in DiffusionRequest
ClosedPublic

Authored by epriestley on Nov 2 2018, 2:56 AM.
Tags
None
Referenced Files
F15450228: D19770.diff
Fri, Mar 28, 2:37 PM
F15443508: D19770.diff
Thu, Mar 27, 4:45 AM
F15429145: D19770.diff
Mon, Mar 24, 12:55 AM
F15425891: D19770.id47229.diff
Sun, Mar 23, 6:33 AM
F15423002: D19770.id47227.diff
Sat, Mar 22, 11:57 AM
F15419593: D19770.id.diff
Fri, Mar 21, 7:15 AM
F15416900: D19770.diff
Thu, Mar 20, 2:21 PM
F15389887: D19770.diff
Mar 15 2025, 5:44 AM
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.