I'm trying to remove space character from a string only when it is bewteen a number and the G
letter.
Sample text: XXX YYY AAA 16Gb 16 Gb 16 G 2 G ZZZ
Target result: XXX YYY AAA 16Gb 16Gb 16G 2G ZZZ
What I have so far is:
'XXX YYY AAA 16Gb 16 Gb 16 G 2 G ZZZ'.replace(/\d+ gb?/ig, '?')