strrchr

Searches backward for a character within a string starting at the end of the string

Syntax

strrchr(string, char)

Argument

string
The string to seach.
char
The character to search for.

Example

Templex Expression Results
{p = "/usr/people/data.xy"

i = strrchr(p, "/")

mid(p, i + 1, 7)}

data.xy

Comments

Only the first match in the string is recognized; all others are ignored.