String Find Position
Retrieves the position of a sub-string in a string.
Settings
in
Input string(s).
out
Position of the sub-string, starting at the index 0. Returns -1 if the sub-string is not found. Can return an array of positions if the sub-string appears several times.
string to find
Sub-string to find position.
use regular expression
When ON, the string to search is interpreted as a regular expression.
- .at matches any three-character string ending with "at", including "hat", "cat", "bat", "4at", "#at" and " at" (starting with a space).
- [hc]at matches "hat" and "cat".
- [^b]at matches all strings matched by .at except "bat".
- [^hc]at matches all strings matched by .at other than "hat" and "cat".
- ^[hc]at matches "hat" and "cat", but only at the beginning of the string or line.
- [hc]at$ matches "hat" and "cat", but only at the end of the string or line.
- [.] matches any single character surrounded by "[" and "]" since the brackets are escaped, for example: "[a]", "[b]", "[7]", "[@]", "[]]", and "[ ]" (bracket space bracket).
- s.* matches s followed by zero or more characters, for example: "s", "saw", "seed", "s3w96.7", and "s6#h%(>>>m n mQ".
- [hc]?at matches "at", "hat", and "cat".
- [hc]*at matches "at", "hat", "cat", "hhat", "chat", "hcat", "cchchat", and so on.
- [hc]+at matches "hat", "cat", "hhat", "chat", "hcat", "cchchat", and so on, but not "at".
- cat|dog matches "cat" or "dog".
\\
to search the \
char (backslash)
See also