This version is out of date, covering development from v5.0.0 to v5.12.2. It is maintained here only for inbound reference links from elsewhere.

Jump to the current version of aTbRef.

Tinderbox Icon

^contains( target, data )^ (DEPRECATED)

This pages describes features, codes or syntax whose use is now DEPRECATED, i.e. not advised either for new or continued pre-existing use.

Deprecated aspects of Tinderbox may be supported on a legacy basis but the latter support can't be presumed to be indefinite. Therefore you should update your active TBX documents to latest practice as soon as practical.


Code Type: 

Code Scope of Action: 

Code First Added: 

Code Altered: 

 Boolean Comparison   [other codes of this type]

 item   [codes with similar scope]

 Already in v5.0.0

 format"


DEPRECATED - use ^value(String.contains("pattern"))^. See ^value^, String.contains().

^contains( target, data )^

If the data (string or pattern) is somewhere within the target string this condition is true. Comparisons are always case-sensitive.

If the data is a pattern this means a fixed string is substituted with a regular expression; it may contain wild cards, character ranges, etc.

Examples:

^contains(Lemon Tree,emo)^ is: true

^contains(Lemon Tree,ora)^ is: false

^contains(^text^, blah)^ (search this note's body text)

^contains(^title(parent)^, blah)^ (do as above but for its parent)

^contains(^directory^, blah)^ (check this note's path)

^contains(^text^, [0-9])^ (search this note's body text for numerical characters)

Note that the beginning of line marker character, ^ (as used in Regular Expression patterns) needs to be doubled because Tinderbox would otherwise interpret it as beginning a mark-up element. Thus:

^contains(^text,^^P)^ looks for lines beginning with a capital P


Possible relevant notes (via "Similar Notes" feature):


A Tinderbox Reference File : Deprecated Usage : Deprecated Export Codes : ^contains( target, data )^ (DEPRECATED)