Page MenuHomePhabricator

Correct an ambiguous regexp in DiffusionRequest
ClosedPublic

Authored by epriestley on Nov 2 2018, 2:56 AM.
Tags
None
Referenced Files
F19942505: D19770.diff
Wed, Apr 15, 7:26 PM
F19863583: D19770.id47229.diff
Mar 14 2026, 11:53 AM
F19853888: D19770.diff
Mar 13 2026, 7:10 AM
F19822820: D19770.id47227.diff
Mar 7 2026, 8:43 AM
F19811928: D19770.diff
Mar 4 2026, 3:02 AM
F19526557: D19770.diff
Jan 18 2026, 6:02 PM
F19526552: D19770.diff
Jan 18 2026, 6:01 PM
F18964781: D19770.diff
Nov 14 2025, 12:35 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.