You can use
inputString.replaceAll("(\\G(?!^)|name=\")([^\"\\p{Punct}]*)\\p{Punct}(?=[^\"]*\")", "$1$2")
See the regex demo
The regex matches
(\G(?!^)|name=\")
- Group 1:name="
or the end of the preceding successful match([^\"\p{Punct}]*)
- Group 2: any zero or more chars other than"
and punctuation chars\p{Punct}
- any punctuation chars(?=[^\"]*\")
- immediately from the current position to the right, there must be any zero or more chars other than"
and then a"
char.