I am looking for where I can find the string.match() inputs(?) like %d+ , %a+, and the such, and what they mean. The purpose of this is to create a calculator within CC. I need to do string separation, but I don't know how. Anyone know where I can get a library of those or an easy to follow tutorial?
[Question] Help with string.match()
Started by Cranium, Aug 17 2012 09:25 PM
7 replies to this topic
#1
Posted 17 August 2012 - 09:25 PM
#3
Posted 17 August 2012 - 10:00 PM
Also found(with extensive googling and CTRL+F'ing) this: http://www.lua.org/m...5.1/manual.html
Section 5.4.1 tells me exactly what I needed.
Section 5.4.1 tells me exactly what I needed.
#4
Posted 17 August 2012 - 10:06 PM
- x: (where x is not one of the magic characters ^$()%.[]*+-?) represents the character x itself.
- .: (a dot) represents all characters.
- %a: represents all letters.
- %c: represents all control characters.
- %d: represents all digits.
- %l: represents all lowercase letters.
- %p: represents all punctuation characters.
- %s: represents all space characters.
- %u: represents all uppercase letters.
- %w: represents all alphanumeric characters.
- %x: represents all hexadecimal digits.
- %z: represents the character with representation 0.
- %x: (where x is any non-alphanumeric character) represents the character x. This is the standard way to escape the magic characters. Any punctuation character (even the non magic) can be preceded by a '%' when used to represent itself in a pattern.
#5
Posted 17 August 2012 - 10:12 PM
That's why I had to use CTRL + F so much... Google doesn't like searching for them...
#8
Posted 18 August 2012 - 12:41 AM
Well, with no coding history beyond Lua in CC, I had no idea what it was I was looking for(name), but I knew what I was looking for(characters).... That sounds illogical, doesn't it?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












