I want to simply match a string in which only one or two numbers might change. Examples:
Cutoff 1 Cutoff 2 ...
Frequency 1 (EQ 1) Frequency 2 (EQ 2) ...
Now I am trying to use string.match(), and finding some good documentation, but I only can find stupid dissertations about lua string matching, not giving any real life examples.
I tried this:
Frequency [%d+] (EQ [%d+]) Frequency %d+ (EQ %d+)
Both tries for a proper matching string do not work, of course. Any idea here, please? Questions:
- How do I match an exact string part, like "Frequency " (including the whitespace)?
- Do I need to interpolate the bracket signs?
Omg, I simply wanted to use a simple pattern matching, but it turns out that LUA devs expect me to spend my whole weekend for such stupid things…