Symbols and Keywords

Here are all the symbols and keywords you can use within NimbleText.

These keywords are only available in the Desktop version. (Compare versions).

The '$0, $1 etc' Keyword

The symbol '$0' is replaced by the value of the first field, the symbol '$1' is replaced by the value of the second field, and so on.

If the input data said:

world, hello
friends, goodbye

...then the output of this pattern:

try it →
$1 $0!!

...would be:

hello world!!
goodbye friends!!

 

The '$h0, $h1 etc.' Keyword

The symbol '$h0' is replaced by the value of the first field in the header row, the symbol '$h1' is replaced by the value of the second field in the header row, and so on.

If the input data said:

Name, Age
Jack, 36
Jill, 38

...then the output of this pattern:

try it →
$h0: $0
$h1: $1

...would be:

Name: Name
Age: Age
Name: Jack
Age: 36
Name: Jill
Age: 38

In practice $h is often combined with the $EACH+ symbol , so that you can process each row but skip the first row, and refer back to the first row from the row you are outputting.

Thus, you can also use the header row to store variables you want to reference in every row.

 

The '$-1, $-2 etc.' Keyword

The symbol '$-1' is replaced by the value of the last field, the symbol '$-2' is replaced by the value of the second last field, and so on. The 'minus' symbol means, 'start counting columns from the right, rather than from the left.'

If the input data said:

Stu, 0, 0, 1
Jim, 1, 2, 2, 3, 8  
Stacey, 0, 0, 1, 3, 3, 9, 9

...then the output of this pattern:

The final score for $0 is $-1

...would be:

The final score for Stu is 1
The final score for Jim is 8
The final score for Stacey is 9

This keyword is only available in the Desktop version.

 

The '$row' Keyword

The keyword '$row' is replaced by the value of the entire row.

If the input data said:

Jack, 36
Jill, 38

...then the output of this pattern:

try it →
The data is: '$row' !!

...would be:

The data is: 'Jack, 36' !!
The data is: 'Jill, 38' !!

 

The '$rowNum' Keyword

The keyword '$rowNum' is replaced by the current row number (with the first row being '0', as nerds like to count from zero)

If the input data said:

Sunny
Windy
Rainy

...then the output of this pattern:

try it →
Day $rowNum will be $0

...would be:

Day 0 will be Sunny
Day 1 will be Windy
Day 2 will be Rainy

 

The '$rowNumOne' Keyword

The keyword '$rowNumOne' is replaced by the current row number (with the first row being '1')

If the input data said:

Sunny
Windy
Rainy

...then the output of this pattern:

try it →
Day $rowNumOne will be $0

...would be:

Day 1 will be Sunny
Day 2 will be Windy
Day 3 will be Rainy

 

The '$numFields' Keyword

The keyword '$numFields' is replaced by the number of fields (or columns) in the current row.

If the input data said:

Stu, 0, 0, 1
Jim, 1, 2, 2, 3, 8  
Stacey, 0, 0, 1, 3, 3, 9, 9

...then the output of this pattern:

There are $numFields columns for $0

...would be:

There are 4 columns for Stu
There are 6 columns for Jim
There are 8 columns for Stacey

This keyword is only available in the Desktop version.

 

The '$ONCE' Keyword

Any text that is after a '$ONCE' keyword will only be output once, regardless of how many rows there are. This applies to the text after a '$ONCE' keyword, but only until a subsequent '$EACH' keyword is found (or the end of the pattern is reached).

'$ONCE' is useful for adding a header or a footer to your output. For real power, use it with an '$EACH' keyword (described next)

If the input data said:

Sunny
Windy
Rainy

...then the output of this pattern:

try it →
Day $rowNumOne will be $0
$ONCEAnd that's it from the weather desk!

...would be:

Day 1 will be Sunny
Day 2 will be Windy
Day 3 will be Rainy
And that's it from the weather desk!

 

The '$EACH' Keyword

Any text that is after a '$EACH' keyword will be output once for each row. This applies to the text after the '$EACH' keyword, but only until a subsequent '$ONCE' keyword is found (or the end of the pattern is reached). You can interleave as many '$ONCE' and '$EACH' sections as you want. They work together to create wonderful things.

If the input data said:

Sunny
Windy
Rainy

...then the output of this pattern:

try it →
$ONCE
Here's a summary of the weather for the next few days.
$EACH
Day $rowNumOne will be $0
$ONCE
And that's it from the weather desk!

...would be:

Here's a summary of the weather for the next few days.
Day 1 will be Sunny
Day 2 will be Windy
Day 3 will be Rainy
And that's it from the weather desk!

So we used the once, each, once pattern to create a simple report with header, repeating-body and footer.

s

 

The '$EACH+' Keyword

'$EACH+' is pronounced 'dollar each plus.' It behaves exactly the same as '$EACH' except that it skips the header row. It exists for the sake of convenience.

If the input data said:

Forecast
Sunny
Windy
Rainy

...then the output of this pattern:

try it →
$EACH+
Day $rowNumOne will be $0
$ONCE
And that's it from the weather desk!

...would be:

Day 1 will be Sunny
Day 2 will be Windy
Day 3 will be Rainy
And that's it from the weather desk!

 

The '$colDelim' Keyword

The '$colDelim' keyword outputs the column delimiter.

Jack, 36
Jill, 38

...then the output of this pattern:

try it →
$0$colDelim $1

...would be the rather uninspiring:

Jack, 36
Jill, 38

 

The '$rowDelim' Keyword

The '$rowDelim' keyword outputs the row delimiter.

Jack, 36
Jill, 38

...then the output of this pattern:

try it →
$ONCE
The row delimiter currently being used is '$rowDelim'

...would be the rather uninspiring:

The row delimiter currently being used is '
'

Because a newline is invisible, there is not much to see in the result above. There is however an undocumented function called unterpret() that will turn new-line characters into the literal text \n and tab characters into the literal text \t

Hence a pattern like this:

try it →
$ONCE
The row delimiter currently being used is '<% unterpret($rowDelim) %>'

...would be the slightly more readable:

The row delimiter currently being used is '\n'

 

The '$pattern' Keyword

The '$pattern' keyword outputs the literal pattern. This is helpful if you've written a really awesome pattern and you expect to use it some time in the distant future. Consider this scenario:

Jack, 36
Jill, 38

...then the output of this pattern:

try it →
$ONCE
Here is the pattern: "$pattern"
$EACH
$0 is aged $1

...would be:

Here is the pattern: "$ONCE
Here is the pattern: "$pattern"
$EACH
$0 is aged $1"
Jack is aged 36
Jill is aged 38

 

$dollar;

The keyword '$dollar;' is replaced by the character '$'

So the output of this pattern:

$dollar;0

...would be:

$0

This is helpful when you want to make patterns to create patterns. Once you're creating patterns that create patterns, then you know you're really living.

This keyword is only available in the Desktop version.

 

$percent;

The keyword '$percent;' is replaced by the character %

This is particularly helpful if you are trying to generate asp.net code, or other code that uses 'bee-stings'.

So the output of this pattern:

<$percent;="Hi" $percent;>

...would be:

<%="Hi" %>

This keyword is only available in the Desktop version.

 

$lt;

The keyword '$lt;' is replaced by the character '<'

So the output of this pattern:

$lt;%="Hi" %>

...would be:

<%="Hi" %>

This keyword is only available in the Desktop version.

 

$gt;

The keyword '$gt;' is replaced by the character '>'

So the output of this pattern:

$lt;%="Hi" %$gt;

...would be:

<%="Hi" %>

This keyword is only available in the Desktop version.

 


Full range of keywords

To get the full range of keywords, you need to use the desktop version of NimbleText.

Further help

You can also get general help, help on all the symbols and keywords, or on the built-in functions, filtering with a where clause, help with the powerful command-line automation, or applying custom formats to your dates and times.

You need to purchase a license to unlock all the features in NimbleText.

If you haven't downloaded NimbleText yet, then for added power, privacy and versatility I sincerely think you should download it now.

Download NimbleText