I am having trouble figuring out how I could get this regex replace to work. I am using textmate and trying to get this:
title="cuba1" (could be any number range from 1-50 and any country name)
to be replaced with this:
data-group="cuba1, cuba" class="cuba“
I have multiple countries with multiple numbers that may or may not go on a country (cuba1, cuba2, etc) as I am setting these on areas and sometimes I need to have groups of areas. This would allow me to implement them faster without needing to do this by hand.
Any help would be appreciated.
Regex:
Replacement:
Tested in Notepad++. These constructs are pretty standard though; should work with any regex implementation.
EDIT: Comes with the usual caveat: regular expressions are not a good fit for HTML