murex Shell Docs

Command Reference: regexp

Regexp tools for arrays / lists of strings

Description

regexp provides a few tools for text matching and manipulation against an array or list of strings - thus regexp is murex data-type aware.

Usage

<stdin> -> regexp expression -> <stdout>

Examples

Find elements

» ja: [monday..sunday] -> regexp 'f/^([a-z]{3})day/'
[
    "mon",
    "fri",
    "sun"
]

This returns only 3 days because only 3 days match the expression (where the days have to be 6 characters long) and then it only returns the first 3 characters because those are inside the parenthesis.

Match elements

» ja: [monday..sunday] -> regexp 'm/(mon|fri|sun)day/'
[
    "monday",
    "friday",
    "sunday"
]

Substitute expression

» ja: [monday..sunday] -> regexp 's/day/night/'
[
    "monnight",
    "tuesnight",
    "wednesnight",
    "thursnight",
    "frinight",
    "saturnight",
    "sunnight"
]

Flags

Detail

regexp 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.

See Also

This site is rebuilt weekly, the content is automatically generated from murex's source code. Last built on Mon May 25 06:11:51 UTC 2020 against commit aa3f3b7aa3f3b7e471543754fdcaf910d4920cad9112b91. Downloadable murex binaries are also built weekly. Current version is 0.48.0120 BETA which has been verified against 29375 tests.