murex Shell Docs

Command Reference: rx

Regexp pattern matching for file system objects (eg '.*.txt')

Description

Returns a list of files and directories that match a regexp pattern.

Output is a JSON list.

Usage

rx: pattern -> <stdout>

Examples

# inline regex file matching
cat: @{ rx: '.*\.txt' }

# writing a list of files to disk
rx: '.*\.go' -> > filelist.txt

# checking if any files exist
if { rx: somefiles.* } then {
    # files exist
}

# checking if no files exist
!if { rx: somefiles.* } then {
    # files do not exist
}

Detail

Unlike globbing (g) which can traverse directories (eg g: /path/*), rx is only designed to match file system objects in the current working directory.

rx uses Go (lang)'s standard regexp engine.

See Also

This site is rebuilt weekly, the content is automatically generated from murex's source code. Last built on Mon Sep 21 06:11:30 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.