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 hyphenComments 0
No comments.