Parsing out and replacing "Word space lower case word" to "CamelCase" two words combined with capitals

I have a csv with the following:
"(space)Comparing concepts; Solving problems;

I want

I would like to remove the spaces at the beginning of the first word AND between the words, then combine and capitalize the two words… like so Word1Word2

How do I do this with regex?
This is what I have tried but it is not working.


Obviously, I have a RegEx gap.


I put your start example in the $Text of a note and added an empty root-level note ‘output’ . I then used this stamp:

var:list vList = $Text;
var:string vString;
   vString+=anItem.capitalize.replace(" ","")+";";
$Text(/output) = vString;

The text in ‘output’ is now: ComparingConcepts;SolvingProblems;.

There might be more elegant ways, but the real starting and ending data type is not specified but the above works.


You are a genius!!!