I'm attempting to split a string before each capital letter present in the string, but cannot identify the error in my expression that is leading me to have no success. Currently the split expression is simply returning the unsplit input as an unchanged output.
Full Flow
1. Manually triggering the flow by inputting a Feature number from Azure DevOps.
2. Getting work item details based on the input of the manual trigger.
3. Composing an object using the Title of the work item.
4. Trimming unwanted portions of the title (ex. Title is "E-Email-CompanyName-ProjectName-P2049284" and result after trim is just "ProjectName")
trim(split(outputs('Compose'),'-')[3])
5. Initializing a string variable with the output of the previous step
6. [this isn't working] Splitting the string variable before each capital letter present within the string.
split(replace(variables('ProjectNameNoSpaces'), '(?=[A-Z])', ' '), ' ')
Examples of Desired Result
Input | Desired Output |
ProjectNameNoSpaces | Project Name No Spaces |
ThisIsJustATest | This Is Just A Test |
AaBbCcDd | Aa Bb Cc Dd |