This is the code snippet I am currently using:
.split(' ')
.join('+')
.replace(/([A-Z])/g, ' $1')
.replace(/^./, function(str) {
return str.toUpperCase();
})
.replace(/\++/g, '')
.replace(/asdf/g, ';')
.replace(';', '')
.replace(' ', '')
.split(';');
The purpose of this code is to transform 'camelCase' into 'Camel Case'. It also has additional functions such as consolidating multiple spaces into a single space using the '+' symbol. Moreover, it replaces instances of 'asdf' with ; and removes the first ; and initial space.
However, there is an issue that arises where my German special characters, specifically ÄÖÜ, are being converted into question marks in the resulting output.
Based on my observations, the output generated looks something like this:
input: ... Oberbayern:Kreis EichstättAsdf ...
output: ... Oberbayern: Kreis Eichsttt; Asdf ...
I would greatly appreciate any assistance in resolving this problem.