murex Shell Docs

Command Reference: match

Match an exact value in an array

Description

match takes input from STDIN and returns any array items / lines which contain an exact match of the parameters supplied.

When multiple parameters are supplied they are concatenated into the search string and white space delimited. eg all three of the below are the same:

match "a b c"
match a\sb\sc
match a b c
match a    b    c

If you want to return everything except the search string then use `!match

Usage

Match every occurrence of search string

<stdin> -> match search string -> <stdout>

Match everything except search string

<stdin> -> !match search string -> <stdout>

Examples

Match Wed

» ja: [Monday..Friday] -> match Wed
[
    "Wednesday"
]

Match everything except Wed

» ja: [Monday..Friday] -> !match Wed
[
    "Monday",
    "Tuesday",
    "Thursday",
    "Friday"
] 

Detail

match is data-type aware so will work against lists or arrays of whichever murex data-type is passed to it via STDIN and return the output in the same data-type.

Synonyms

See Also

This site is rebuilt weekly, the content is automatically generated from murex's source code. Last built on Mon Aug 3 06:12:53 UTC 2020 against commit 2557f7c2557f7cc7535c452c21d89164bd38ed8996f02fd. Downloadable murex binaries are also built weekly. Current version is 0.52.2000 BETA which has been verified against tests.