Closed laralove143 closed 2 years ago
Syntax aside, how would this even work? The ambiguities would be numerous.
how so? the rule should be simple, *
matches 0 or more characters except the ones that would be matched by the next capture after it, like in *[hour]
, *
would match any number of any character that isn't a digit (or whatever characters [hour]
would match)
And if there's two instances of the format in a string? It's not clear with should be accepted. Or if there's a random number in the string before the format starts. I think this is too broad, highly error prone, easy to break on the user's end, and ambiguous in many situations. Feel free to try to convince me otherwise, but I don't see this as happening.
the
format_description
is very useful, but it wouldn't work with strings like "aaa 12:00 aaa" so maybe there could be made something likeformat_description!("*[hour]:[minute]*")
, it'd be very useful