#3456 grossly adapted MatchSpec::parse to introduce a robust handling of extra white space in MatchSpec. This current solution is improper (it reallocates memory several time for the edge cases mentioned in #3453), and must be introduced in split_version_and_build as mentioned in #3456 (comment).
Part of the complexity of the parser adaptation comes from MatchSpec's flexibility (for instance numpy 2.0 hxyzw is a valid MatchSpec).