LeFiXER Grandmaster Cheater Supreme Reputation: 20
Joined: 02 Sep 2011 Posts: 1053 Location: 0x90
|
Posted: Sun Sep 26, 2021 6:28 am Post subject: |
|
|
You have a few options available:
Quote: |
• find(string, pattern [, init [, plain]]): This function returns to start and end index of a match pattern in a string.
• match(string, pattern [, index]): This function matches a pattern once the matching starts at the given index.
• gmatch(string, pattern): This function returns a function which iterates through all matches pattern in string.
• gsub(string, pattern, repl [, n]): This function is used to replace the matched string by substrings and n-specify the number of replacements.
|
Rules:
Quote: |
• .– : This is a pattern which matches all characters.
• %a: This is a special sequence which matches all letters.
• %l: This is a special sequence which matches all lowercase letters.
• %u: This is a special sequence which matches all uppercase letters.
• %d: This is a special sequence which matches all digits.
• %s: This is a special sequence which matches all whitespace characters.
• %x: This is a special sequence which matches all hexadecimal digits.
• %p: This is a special sequence which matches all punctuation characters.
• %g: This is a special sequence which matches all printable characters except space.
• %c: This is a special sequence which matches all control characters.
• [set]: This is a set which matches the class which is the union of all characters in set.
• [^set]: This is a special sequence which matches the complement of set.
• +: This is a greedy match which matches 1 or more occurrences of previous character class.
• *: This is a greedy match which matches 0 or more occurrences of previous character class.
• ?: This is a match exactly which matches 0 or 1 occurrence of previous character class.
• – -: This is a lazy match which matched 0 or more occurrences of previous character class.
|
|
|