The regex for integer arrays to distinct them from lists is
This matches int array items things like
which cannot be parsed as integers.
Note: It might be good if the string would be parsed as list if it could not be parsed as integer array, because a NBT list would be more obvious than a NBT string given that it matched the list requirements in the first place.
- Use the following command
- Throw the item on the ground and inspect its NBT data
→ You will see that the tag IntArrayTest is a String (IntArrayTest:"[+++,---,+-+-]") instead of a list (IntArrayTest:["+++","---","+-+-"]), which means it matched the integer array pattern but could not be converted to an integer array
The suggested regex could for example be
or maybe with additional whitespaces in case somebody wants to parse a pretty printed integer array: