String manipulations

String manipulations


I have this string:

  1. Name1-Color-1.jpg - Name2-Color-1.jpg - Name1-Color-2.jpg - Name2-Color-2.jpg -  

I need for example, the URLs that are Name1-Color to be saved in an array with the same name as the file without the number in front of it or the extension. The expected result is this:

I need this result to be able to iterate with them in another function.

I understand that this could be done with regex but I'm not very good with string manipulations or regex. Can you help me?

Thank you all very much!

      Zoho SalesIQ Resources

            Zoho TeamInbox Resources

              Zoho DataPrep Resources

                  Zoho CRM Plus Resources

                    Zoho Books Resources

                      Zoho Subscriptions Resources

                        Zoho Desk Resources

                          Zoho Projects Resources

                            Zoho Sprints Resources

                              Qntrl Resources

                                Zoho Creator Resources

                                  Zoho WorkDrive Resources

                                      Zoho Campaigns Resources

                                        Zoho CRM Resources

                                                    Design. Discuss. Deliver.

                                                    Create visually engaging stories with Zoho Show.

                                                    Get Started Now

                                                      Zoho Show Resources

                                                        Zoho Writer Writer

                                                        Get Started. Write Away!

                                                        Writer is a powerful online word processor, designed for collaborative work.