occurrence, occurrences
-
keyword
-
replace command
-
number of occurrences function
-
Synonyms: instance, instances
-
function — occurrence, every occurrence (of text or pattern)
-
new in 1.81
-
The occurrence and everyOccurrence functions have identical syntax to the offset, range, everyOffset, and everyRange functions. Instead of returning the offset(s) or range(s) of an occurrence, however, these return the actual occurrences of something. These functions can be used to find occurrences of either patterns or strings, but are particularly useful with pattern matching.
put the occurrence of <"(",chars,")"> in "sqrt(42)" —> "(42)"
put every occurrence of <3 digits> in "123456" -> (123,456)
- chunk type
- new in 1.81
- The match chunk type will return a pattern match property list:
put the second match of <3 digits> in "987654321"
-> (text:"654", text_range:"4" to "6")