pattern required default (empty)The PCRE regular expression, including its delimiters (for example /[0-9]{4}/). Standard PHP preg_match syntax. Caution: a colon is the AA parameter separator, so the pattern must not contain a bare colon - match around it or pick a colon-free pattern.
subject required default (empty)The text to search. Usually an item field getter such as {headline........}. Like the pattern, it must not contain a bare colon, which AA would read as the next parameter.
matched optional default 0 (whole match)Which match to return: 0 (the default) is the whole matched text, 1 is the first parenthesised capture group, 2 the second, and so on. A non-numeric or out-of-range value yields match 0 or an empty string respectively.
{preg_match:/[0-9]{4}/:Annual Report 2024}
{preg_match:/[0-9]+/:Order 12345 shipped}
{preg_match:/[A-Z]{2,}/:Filed under APC news}
{preg_match:/(\d{4})-(\d{2})-(\d{2})/:Date 2024-03-15 today:1}
{preg_match:/(\d{4})-(\d{2})-(\d{2})/:Date 2024-03-15 today:2}
{preg_match:/\b[a-z]+\.org\b/:Email to info@apc.org today}
{preg_match:/[0-9]{4}/:No digits at all}
{preg_match:/(\d+)/:abc 99 def:5}
{preg_match:/[0-9]{4}/:{headline........}}