Page MenuHomePhabricator

Correct an ambiguous regexp in DiffusionRequest
ClosedPublic

Authored by epriestley on Nov 2 2018, 2:56 AM.
Tags
None
Referenced Files
F15389887: D19770.diff
Sat, Mar 15, 5:44 AM
F15380842: D19770.diff
Fri, Mar 14, 4:43 AM
F15374976: D19770.id47227.diff
Wed, Mar 12, 8:53 PM
Unknown Object (File)
Tue, Feb 25, 9:57 AM
Unknown Object (File)
Thu, Feb 20, 1:52 AM
Unknown Object (File)
Tue, Feb 18, 4:56 AM
Unknown Object (File)
Feb 8 2025, 5:27 PM
Unknown Object (File)
Feb 8 2025, 5:26 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.