I am trying to clean below data in R I have a vector of strings, that looks something like this -
/organization/-fame
/ORGANIZATION/-QOUNTER
/organization/-qounter
/ORGANIZATION/-THE-ONE-OF-THEM-INC-
/organization/0-6-com
/ORGANIZATION/004-TECHNOLOGIES
/organization/01games-technology
/ORGANIZATION/0NDINE-BIOMEDICAL-INC
/organization/0ndine-biomedical-inc
/ORGANIZATION/0XDATA
/organization/0xdata
/ORGANIZATION/0XDATA
/organization/0xdata
/ORGANIZATION/1
/organization/1
/ORGANIZATION/1
/organization/1-2-3-listo
/ORGANIZATION/1-4-ALL
/organization/1-618-technology
/ORGANIZATION/1-800-DENTIST
/organization/1-800-doctors
/ORGANIZATION/1-800-PUBLICRELATIONS-INC-
/organization/1-mainstream
/ORGANIZATION/1-OF-99
/organization/10-20-media
/ORGANIZATION/10-20-MEDIA
I want to change the case of every word in the string to sentence case. So after changing it all must look like -
/Organization/-Fame
/Organization/-Qounter
/Organization/-The-One-Of-Them-Inc-
/Organization/0-6-Com
/Organization/004-Technologies
/Organization/01Games-Technology
/Organization/0Ndine-Biomedical-Inc
/Organization/0Xdata
/Organization/1
/Organization/1-2-3-Listo
/Organization/1-4-All
/Organization/1-618-Technology
/Organization/1-800-Dentist
/Organization/1-800-Doctors
/Organization/1-800-Publicrelations-Inc-
/Organization/1-Mainstream
/Organization/1-Of-99
/Organization/10-20-Media
You can use a regular expression. With your sample input
You can run
to get