Trex

0.3.0

TREX (Token Regular EXpression) is a regex-shaped pattern language over typed tokens. The lexer reads the input once into typed tokens and a pattern matches over them: a whole number, word, quoted string, IP address, URL, email address, timestamp, version and 18 more kinds are one atom each, and the whitespace between tokens is never written. A capture binds a named r
TREX (Token Regular EXpression) is a regex-shaped pattern language over typed tokens. The lexer reads the input once into typed tokens and a pattern matches over them: a whole number, word, quoted string, IP address, URL, email address, timestamp, version and 18 more kinds are one atom each, and the whitespace between tokens is never written. A capture binds a named register that a later token must equal, a balanced bracket group matches whole, and matching does not backtrack. Twelve property axes read what the input does at each position, and a pattern can ask any of them there.
Show more

Minimum PowerShell version

5.1

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name Trex

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name Trex

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) 2026 Mark Newton

Package Details

Author(s)

  • Mark Newton

Tags

pwrs powershell regex tokens pattern-matching text-search cmdlet

Cmdlets

New-TrexPattern Select-TrexMatch Test-TrexMatch Get-TrexFile Get-TrexFileType Get-TrexLine New-TrexStreamScanner Edit-TrexText Protect-TrexText Group-TrexMatch Get-TrexToken Get-TrexRecord Get-TrexRecordShape ConvertTo-TrexPattern ConvertFrom-TrexText ConvertTo-TrexLiteral Find-TrexRecord New-TrexIndex Get-TrexIndex Get-TrexRule Invoke-TrexRule ConvertTo-TrexSarif Measure-TrexMagnitude Measure-TrexStress Measure-TrexFlow Measure-TrexObservation Measure-TrexGravity Measure-TrexContext Measure-TrexEcho Measure-TrexOrbit Measure-TrexShape Measure-TrexRelation Measure-TrexSpectral Measure-TrexSeam New-TrexGrammar Invoke-TrexGrammar New-TrexBpe Import-TrexBpe Export-TrexBpe ConvertTo-TrexBpe New-TrexPrefilter Test-TrexPrefilter Register-TrexAtom Import-TrexAtom Get-TrexAtom Unregister-TrexAtom Test-TrexAtom New-TrexLibrary Get-TrexClock Set-TrexClock Get-TrexInfo

PSEditions

Desktop Core

Dependencies

This module has no dependencies.

Release Notes

This version puts the CUDA kernel in every Windows and Linux artifact, this module's native library among them, built with CUDA 12.0 for NVIDIA drivers of the 525 series or later. It adds readings of the gravity and context axes, every axis's own thresholds as settings, written cuts on @seam and @ambiguous, and a hex token kind. A number written with an exponent, a radix prefix or underscore groups lexes as one number, and text outside ASCII reads as text. It breaks 0.2.0 callers, which is why it is 0.3.0. What changed is listed in https://github.com/Variably-Constant/trex/blob/main/CHANGELOG.md.

FileList

Version History

Version Downloads Last updated
0.3.0 (current version) 10 10/6/2026
0.2.0 10 10/1/2026
0.1.0 9 9/30/2026