Initially I tried
folder_path.glob('[0-9]_*.json')
Where folder_path is a pathlib.Path object. But it only works for files that start with a single digit.
after failing to find a proper match pattern, I used an additional condition to verify that what precedes the underscore is a numeric string
[ file_path for file_path in folder_path.glob('*_*.json') if file_path.name.split('_')[0].isnumeric() ]
but that seems like a workaround that only applies to this case. Is there a better way to match numbers of any length using glob?