A Tinderbox Reference File : Export Codes : Export Code Scope : Item-based : ^contains( target, data )^ |
^contains( target, data )^ |
^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
Up: Item-based | |
Previous: ^comment( data )^ | Next: ^created( item[, format] )^ |
Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
[See aTbRef CC licence Attribution/Waiver info info]