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