match(string,pattern)

Description

returns that part of the string that matches the pattern
string can be any valid string or reference to a folder or item
the pattern can be any Regex pattern, see examples

Example

match("T 123456 234567","\s*\w\s+(\d+)\s+\d+\s*")
returns the string 123456

match(123.456,"(\d*)(?=\.)")
returns the integer part of the number 123

Related Rules

imatch(), replace(), ireplace()