I would like to come up with a script to program a custom formula for google sheet. The idea is to split a string composed of multiple words. The formula should recognize the words where there is a capital letter and separate them. The result would be a string where the words are separated by ",".
To clarify this is an example of the string:
Nursing StudentStudentNurseNursing School
Desired Result:
Nursing Student,Student,Nurse,Nursing School
I have tried to use a formula in Google Sheet:
=split(regexreplace(A1,"[A-Z][^A-Z]*","$0"&char(9)),char(9))
However, it generates 6 cells with the below strings:
Nursing Student Student Nurse Nursing School
Can anybody help me or give me some hint?