# Formatting cell text (Upper case after period) - STRING MANIPULATION - Capitalize (str, chars)

**URL:** <https://forum.knime.com/t/formatting-cell-text-upper-case-after-period-string-manipulation-capitalize-str-chars/78867>\
**Category:** KNIME Analytics Platform\
**Created:** [April 29, 2024, 2:01pm UTC](https://forum.knime.com/t/formatting-cell-text-upper-case-after-period-string-manipulation-capitalize-str-chars/78867 "2024-04-29T14:01:53Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![takbb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/takbb/32/57077_2.png) [@takbb](https://forum.knime.com/u/takbb)\
**Post date:** [April 30, 2024, 12:43pm UTC](https://forum.knime.com/t/formatting-cell-text-upper-case-after-period-string-manipulation-capitalize-str-chars/78867/12 "2024-04-30T12:43:06Z")

</div>

Hi @KaboboJakobo , this is almost certainly because for at least one value that it is trying to manipulate, you have missing data.

Try this:

```auto
$$CURRENTCOLUMN$$==null?toNull("")
:replace(
	  capitalize(
		regexReplace($$CURRENTCOLUMN$$, "(\\.\\s*)(\\S)", "$1¬$2")
		, "¬")
       , "¬", "")

```

This does a test, and if the particular value is null (missing) it returns `toNull("")` which is how String Manipulation can return a missing value, otherwise it returns the calculated value as before.

You probably won’t find that syntax in the node documentation. For further info see here:

> [@Fun with String Manipulation's "undocumented features"](https://forum.knime.com/t/fun-with-string-manipulations-undocumented-features/66111):
>
> For a while now I’ve been using various features of String Manipulation that you won’t generally find documented. I guess therefore, that what I am writing here should be given the caveat “use at your own risk” since it is always possible that in the future, the String Manipulation (and its “(variable)” counterpart node) could be rewritten and the undocumented features would no longer work. However, since it sits on top of java, and these features make use of its close relationship with java, i…

Specifically, the syntax of the conditional statement is described here:

> [@IF, OR, AND Statement Rule Engine](https://forum.knime.com/t/if-or-and-statement-rule-engine/66066/4):
>
> Just for the excitement of having yet another option ;-)… if you really want to, you can do nested if statements within String Manipulation too. It’s hidden away, but it’s there: e.g. string( $column1$.equals("Y") ?"Some result" :$column2$.equals("Y") && $column3$.equals("N") ?"A different result" :$column2$.equals("Y") ?"Yet another result" :"Bored now!" ) The syntax is condition ? result if true : result if false and as you can see, you can nest the conditions. It’s…

---

_[View the full topic](https://forum.knime.com/t/formatting-cell-text-upper-case-after-period-string-manipulation-capitalize-str-chars/78867)._
