pos(string,substring)
Description
gives the position of substring in the string position starts with 1 at the left end returns 0 if no match found.
Example
trim(substr(ITT,pos(ITT, 'Source:')+7))
returns a part of the item text after "Source:" tag
- pos(ITT,'Source:') returns a position of "Source:" tag in the item text
- +7 to compensate for the length of Source:
- substr() returns part of the string starting from the given position
- trim() deletes leading and tracing spaces
++:!I:trim(substr(ITT,pos(ITT,'Comment:')+8)):ITT~='Comment:'
- putting a part of the item text after Comment: tag into a Comments folder.
- ITT~='Comment:' condition checks whether the item contains Comment:
Related Rules
rpos()