Easy to do in VS Code global search Search: data-target="([\w\d]+)\.([\w\d]+)" Replace: data-$1-target="$2"