
/([^/]+)_\d+.jpg$
The round brackets here mean that now we are defining a group of characters. Within the group, we define a set of characters with the square brackets notation []. And this set is interested in every possible character except the forward slash (/) character, this is defined by ^/ , where ^ has a ‘negation’ effect. Like before, the plus sign (+) means that there are arbitrarily many characters (that are not forward slashes). To summarise the above, ([^/]+) is looking for a group of characters that do not contain forward slashes.