murex Shell Docs

Command Reference: rx

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


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

Output is a JSON list.


rx: pattern -> <stdout>


# 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


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'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 Fri Sep 10 15:05:25 UTC 2021 against commit 437c274437c274fded54d82e99d70ea7d2917f332c095dd.

Current version is 2.2.1200 BETA which has been verified against tests.