Discrepancy exists between identifier-allowed characters and path segment-allowed characters
Namespaced IDs' paths can have ASCII lowercase alphabets, ASCII digits, dots, underscores, slashes, and hyphens. However, the path segment of a directory-based resource pack only allows ASCII lowercase alphabets, ASCII digits, dots, or underscores, but not hyphens.
This can potentially interfere with overriding assets/data using extracted resource pack/data pack if the path contains a hyphen. However, I am not aware of a vanilla stuff with a hyphen in the path. This mostly affects mods and potentially custom data packs.
(Slashes are directory separators and thus does not cause issues.)
See the following code:
public class x { private static final Pattern d = Pattern.compile("[._a-z0-9]+"); // notice there is no hyphen
2022-10-20, 07:02 PM
2022-10-24, 09:43 AM
2022-10-24, 09:43 AM
3
3