Page MenuHomePhabricator

Correct an ambiguous regexp in DiffusionRequest
ClosedPublic

Authored by epriestley on Nov 2 2018, 2:56 AM.
Tags
None
Referenced Files
F14406710: D19770.id47229.diff
Mon, Dec 23, 7:32 PM
F14406686: D19770.id47227.diff
Mon, Dec 23, 7:16 PM
F14406481: D19770.diff
Mon, Dec 23, 2:37 PM
Unknown Object (File)
Sat, Dec 21, 12:10 AM
Unknown Object (File)
Sat, Dec 14, 4:01 AM
Unknown Object (File)
Sun, Dec 1, 3:53 PM
Unknown Object (File)
Nov 22 2024, 1:08 AM
Unknown Object (File)
Nov 21 2024, 10:04 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
Branch
range1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 21074
Build 28637: Run Core Tests
Build 28636: arc lint + arc unit

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.