IndexError: no such group

Hey All!
I’m getting ‘IndexError: no such group’ error when trying to use ‘ImageDataBunch.from_name_re’

My code is
path_img = Path('/myDatasetNew/images'); path_img
fnames = get_image_files(myDatasetNew); fnames[-5:]
pat = re.compile(r'[^/myDatasetNew/images][a-zA-Z]+'); pat
tfms = get_transforms(do_flip=False)
data = ImageDataBunch.from_name_re(path_img, fnames, pat, ds_tfms=tfms, bs=bs ).normalize(imagenet_stats)

Here while trying to run the cell where I define data is where I get IndexError: no such group

My file names are like
PosixPath(’/myDatasetNew/images/ valueiWant _ rose-165819__340.jpg’),

P.s. All the images have extension ‘.jpg’ I’ve made sure of it. :frowning: