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 Wed Jan 12 10:38:51 UTC 2022 against commit 50d6f4550d6f45b79e200b3cbc8e8e2639854a5265c7021.

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