Page MenuHomePhabricator

Correct an ambiguous regexp in DiffusionRequest
ClosedPublic

Authored by epriestley on Nov 2 2018, 2:56 AM.
Tags
None
Referenced Files
F15528325: D19770.id47227.diff
Tue, Apr 22, 10:25 AM
F15524141: D19770.id.diff
Mon, Apr 21, 6:12 AM
F15521250: D19770.diff
Sun, Apr 20, 12:34 PM
F15508834: D19770.diff
Wed, Apr 16, 6:46 AM
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
Mar 23 2025, 6:33 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.