I have a html string, where i need to grab the src
and href
values, if they meet a pattern. The pattern is;
/myfolder/[gu-id]/[image,file]
The gu-id is in the pattern of '65f2383b-de39-4a9c-8e8c-de1c06e469ca'
The image or file can be any jpg,gif,pdf,doc,xlsx.png,txt,zip and so on.
My current regex is this: ((\/myfolder\/[({]?[a-fA-F0-9]{8}[-]?([a-fA-F0-9]{4}[-]?){3}[a-fA-F0-9]{12}[})]?\/?.*\.(?:png|jpg|pdf|gif|jpeg|xls|xlsx|word|doc|txt|zip)))
But in a string with multiple files, it ends with the last one, as the end of the first match - so it only finds one match, but the end point, is another file.
How can I make it match every file, and not only one?