Guide to Regex
Revision as of 00:28, 16 January 2021 by TheYeetster (talk | contribs) (Added a bunch of files to show how to enable highlighting strings and Regex)
Introduction
Regex is a way to search a subtext within a text. It will allow you to search more complex things and will give you more freedom on what to highlight. It however is a bit complex to fully understand in one go. See the Examples for some easy to use regex strings. The regex will be case insensitive by default in game.
A helpful tool in testing your regex string is this site here.
How to enable Regex in the chat window
- Click the Options Gear in the chat window.
- Click highlight string.
- Enter the words you want to be highlighted.
- Words are now highlighted.
- Check enable regex.
Info
This part is under construction. Please view the BYOND Regex reference in the meantime.
Examples
Description | Regex syntax | Example regex | Example output |
Select a multiple of sub texts that start with the given text | \bword1|\bword2 | \bhello|\bworld | hello beautiful worlds! hhello |
---|---|---|---|
Select a multiple of sub texts that have to fully match the given text | \bword1\b|\bword2\b | \bhello\b|\bworld\b | hello beautiful worlds! hhello |
Select a word with an aritrary (non zero) amount of characters in one spot | word+ | ca+ptain | Caaaaaaaaaaaptain! captain nukies onboard! |