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 Tue Jun 22 08:18:17 UTC 2021 against commit 2235c7b2235c7b18f86f1cf214e246b88b0ea193d87fe80.

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