November Development Updates

This month we wanted to highlight five new functions for the Text Blaze Formula language.

Text Blaze formulas are an advanced feature so feel free to skip this if you don't use formulas. If you do use formulas though, these new functions will make some things a lot easier!

Aa Capitalizing Text

We've added a new proper() function that capitalizes the first letter in each word.

{=proper("MR. JOHN SMITH")}
{=proper("ms. jane DOE")}

:spiral_notepad: Checking the start or endings of text

We've added new startswith() and endswith() functions that make it easy to check if your text starts or ends with a specific word of phrase.

{=startswith("The fox jumped", "The")}
{=endswith("The fox jumped", "jumped")}

:gear: More powerful regular expression

We've added two new regular expression functions: replaceregex() and splitregex().

replaceregex() allows you to replace all the pieces of text that match a regular expression. For example, if you wanted to replace all numbers in a piece of text with "X", you could use the following:

{=replaceregex("The phone number is 555-555-1234", "\d", "X", "g")}

In the above example, "\d" means match a numeric digit and "g" means replace all matches. If we left off the "g", we would just replace the first match.

splitregex() allows you to convert a piece of text to a list by splitting by matches. For example, if you wanted to split by commas but the data was messy and sometimes had a space after the comma and sometimes not, you could do the following:

{=splitregex("red,green, blue, purple", ",\s*")}

In the example above, ",\s*" means to match a comma followed by any number of spaces (or no spaces at all).

As always...

If you have any questions feel free to post to our Question and Answer forum. If you have anything you would love to see in Text Blaze, please suggest it in the Features Ideas forum.


Looking forward to using these!