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

Elements containing

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

Elements excluding

» ja [monday..sunday] -> !regexp 'm/(mon|fri|sun)day/'
[
    "tuesday",
    "wednesday",
    "thursday",
    "saturday"
]

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.

Synonyms

See Also


This document was generated from builtins/core/lists/regexp_doc.yaml.

This site's content is rebuilt automatically from murex's source code after each merge to the master branch. Downloadable murex binaries are also built with the website.

Last built on Thu Aug 15 14:38:34 UTC 2024 against commit 50ed9d650ed9d6df391240d3c2c02e623636e508dfcdad1.

Current version is 6.2.4000 which has been verified against tests cases.