Skip to main content
Version: 23.5

Chunk Expressions

For easily accessing elements within text, SenseTalk provides a very powerful type of expression called a chunk expression. Chunk expressions give you great flexibility in referring to any portion of text, from a single character to a range of lines, in a very natural way. Here are some brief examples:

... character 3 of partNum ...
... the second word of companyName ...
... items 2 to 4 of "a,b,c,d,e,f,g,h" ...
... the first 3 lines of file "log" ...

You can use chunk expressions to grab lines, text items, words or characters from any container or text value. You can also describe part of a list or part of a binary data value using a chunk expression.

Chunk expressions can also be combined into more complex expressions, such as,

... chars 1 to 3 of the last word of line 2 of myText ...

Using Chunks

To understand how to use chunks in the chunk expressions you plan to create, see the following topics:

Chunk Types: Read this information to understand how to use the various chunk types when creating chunk expressions.

Chunk Syntax: Read this information to understand the syntax to use when using the various chunk types to create chunk expressions.

Working with Chunks: Read this information to understand some advanced ways of working with chunks.