How could I convert this to PascalCase and to camelCase? Answer A fully ES5 compatible way to do this is, to find all the dashes that are followed by an alphanumeric character using this simple regex /-w/g. Then just remove the dash and uppercase the character. The same can be done for pascal case just by also checking for the