
Lua pattern matching vs. regular expressions - Stack Overflow
Jun 2, 2014 · I'm currently learning lua. regarding pattern-matching in lua I found the following sentence in the lua documentation on lua.org: Nevertheless, pattern matching in Lua is a powerful tool and incl...
Newest 'lua-patterns' Questions - Stack Overflow
Aug 20, 2025 · Capture pattern multiple times between 2 strings in Lua I'd like to capture all occurrences of a pattern between 2 strings using Lua. This does what I want except that it only ... lua lua-patterns …
Logical 'or' in Lua patterns? - Stack Overflow
Lua does not use standard regular expressions for pattern matching. A quote from the book Programming in Lua explains the reason: Unlike several other scripting languages, Lua does not use …
How to use a pattern in Lua 5.1 or Neovim to match multiple file ...
May 16, 2025 · In Lua 5.1 matching patterns the character | has no specific meaning apart being an ordinary character, so the only way to check the file path with any of the specified extensions is to …
Greedy/Non-Greedy pattern matching and optional suffixes in Lua
Nov 29, 2012 · In Lua, I'm trying to pattern match and capture: +384 Critical Strike (Reforged from Parry Chance) as (+384) (Critical Strike) where the suffix (Reforged from %s) is optional.
lua patterns - Match a word or whitespaces in Lua - Stack Overflow
May 22, 2017 · What I'm trying to do is matching a word (with or without numbers and special characters) or whitespace characters (whitespaces, tabs, optional new lines) in a string in Lua.
lua string pattern matching - using specific words as char-sets
Jan 2, 2025 · None of those patterns do what you think they do. Parentheses aren't special inside of classes, so Animal=[(Dog)(Cat)] is the same as Animal=[()CDagot]. So it was never matching your …
parsing - Lua string manipulation pattern matching alternative ...
Oct 7, 2013 · The function MatchAny will match its first argument (a string) against a list of Lua patterns and return the result of the first successful match.
lua patterns - Repetitive regular expression in Lua - Stack Overflow
Dec 6, 2021 · Lua patterns do not support limiting quantifiers and many more features that regular expressions support (hence, Lua patterns are not even regular expressions). You can build the …
How to write this regular expression in Lua? - Stack Overflow
23 Lua does not have regular expressions, mainly because a full regular expression library would be bigger than Lua itself. What Lua has instead are matching patterns, which are way less powerful (but …