Page MenuHomePhabricator

Correct an ambiguous regexp in DiffusionRequest
ClosedPublic

Authored by epriestley on Nov 2 2018, 2:56 AM.
Tags
None
Referenced Files
F14876952: D19770.id47229.diff
Sat, Feb 8, 5:27 PM
F14876942: D19770.id47227.diff
Sat, Feb 8, 5:26 PM
F14876941: D19770.id.diff
Sat, Feb 8, 5:26 PM
Unknown Object (File)
Thu, Feb 6, 5:05 AM
Unknown Object (File)
Sat, Feb 1, 9:28 PM
Unknown Object (File)
Sat, Feb 1, 8:54 PM
Unknown Object (File)
Jan 2 2025, 10:53 AM
Unknown Object (File)
Dec 29 2024, 12:25 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.