Tinderbox v9 Icon

Stream.captureNumber[("targetAttribute")]


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Altered: 

 Function   [other Function type actions]

 Item   [operators of similar scope]

 Stream parsing   [other Stream parsing operators]

 9.1.0

 


Stream.captureNumber[("targetAttribute")]

Stores the next number in the string in the specified targetAttribute, and returns the string that follows this line. and returns the string that follows this word. Fails if the match is empty or entirely white space. Further text after the number is ignored.

A number is assumed to be any character continuous sequence of one or more number characters between 0–9 (zero through nine). Formatted numbers will not be fully matched.

Thus sequence "There are 1234 items" makes a 'number' match of 1234. But for "There are 1,234 items" or "There are 1.234 items" the match will be the first number (1) only as it is followed by a non-number character.



A Tinderbox Reference File : Actions & Rules : Operators : Full Operator List : Stream.captureNumber[("targetAttribute")]