← All packages

named-patterns-demo

Named Regex Pattern Matching Demo

Download .mpackage
Version
1
Author
Vadi
Created
11 Mar 2021
Updated
6 Feb 2025

Install from Mudlet's command line

mpkg install named-patterns-demo

Mudlet 4.20+ with mpkg installed

Or drag it in

Drag into MudletDrop it on the main window

Mudlet 4.11+ · click to download instead

Description

This software package demonstrates the usage of named patterns in trigger matching, allowing developers to use descriptive variable names instead of numerical indexes when capturing regex matches. The package provides a flexible approach to pattern matching that simplifies handling complex regular expressions, particularly when match order can vary. It enables more readable and maintainable code by allowing developers to reference captured groups by meaningful names rather than array positions.


This package was originally shared on the Mudlet Forums by the author. We’ve automatically listed it here on packages.mudlet.org so more users can discover and benefit from it. Please let us know if you have any questions or concerns - thanks for contributing to the Mudlet community!

Trigger (1)

Script (1)

Files (2)

3.6 KB unpacked

Select a script or file on the left to preview it here.