This version is out of date, covering development from v9.0.0 to v9.3.0. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v9 Icon

String.extractAll("regex")


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Altered: 

 Function   [other Function type actions]

 Item   [operators of similar scope]

 Data manipulation   [other Data manipulation operators]

 9.1.0

 


String.extractAll("regex")

The operator returns a (semi-colon delimited) list of all matches for a quote-enclosed regex found in the source String.

For example:

$MyList = $Text.extractAll("#[A-Za-z]+"); 

would return a list of all discrete tag instances in the source String such as: "#Tinderbox;#Stuff;#Thing;#tinderbox;#Tinderbox;#Cars".

To get a de-duped list, without the hashes we can chain other operators:

$MyList = $Text.extractAll("#[A-Za-z]+").unique.replace("#",""); 

That refines the returned list: "Cars;Stuff;Thing;Tinderbox;tinderbox". Note the extra operators also sort the list too.