script to insert whitespace before capital letters for all columnsHi guys. I'm getting started on jmp scripting (just got a basic handle on for-loops), but I'm a bit stuck on the JMP syntax still.
I want to write an automated script that find capital letters across all columns in the active data table, and adds a whitespace character before the capital letters. so "TimeSpent" --> " Time Spent". I'd then use a trim function to remove the initial whitespace before the "T".
Thanks heaps!
Re: script to insert whitespace before capital letters for all columnsThank you, it works!Re: script to insert whitespace before capital letters for all columnsRegex is particularly good at this:
value = "TimeSpentOnMyProject";
newvalue = regex( value, "([a-z])([A-Z])", "\1 \2", GLOBALREPLACE);
show(value,newvalue);
value = "TimeSpentOnMyProject";
newvalue = "Time Spent On My Project";
post here