SEARCH function: Difference between revisions

From Planfix
Jump to: navigation, search
No edit summary
No edit summary
 
Line 1: Line 1:
{{#seo:
|title=SEARCH function
|titlemode=append
|keywords=planfix, Function, SEARCH
|description=SEARCH function
}}
The SEARCH() function finds one text string within another and returns the starting position of the first text string relative to the first character of the second text string.
The SEARCH() function finds one text string within another and returns the starting position of the first text string relative to the first character of the second text string.
*The function is not case-sensitive.
*The function is not case-sensitive.

Latest revision as of 07:33, 10 May 2024

The SEARCH() function finds one text string within another and returns the starting position of the first text string relative to the first character of the second text string.

  • The function is not case-sensitive.
  • If the substring is not found, the function returns -1.
  • If the empty string ("") is set as the argument for search_text, the SEARCH function will return 1.
  • Wildcards can be used in the argument for search_text: question mark (?) and asterisk (*). Question marks match any character; asterisks match any sequence of characters. If you need to include a question mark or asterisk in the search text, put a tilde (~) before the symbol in the argument.


Format:

SEARCH(search_text;string)

SEARCH(search_text;string)


Example:

SEARCH("BOAT*down?he stream";"Row, row, row your boat, gently down the stream") //returns 20

SEARCH("What's up~?"; "Did he ask you what's up?") //returns 16

SEARCH("apple?";"one apple two apples") //returns 5

MID({{Task.Field}};Search(",";{{Task.Field}})+2;1000) // returns Tom, if Task.Field="Hello, Tom"


Go To