string.substring.findstring.matchstring.splitstring.sub function do in Lua?
string.substring.matchstring.findstring.gsubstring.find in Lua if the substring is not found?
nilfalsestring.splitstring.substring.matchstring.gsub return in Lua?
string.substring.findstring.matchstring.splitstring.gsub("hello", "e", "a") return?
"hallo""hello""halla""hella"string.matchstring.findstring.substring.gsubstring.trimstring.stripstring.sub.*+?^a match?
+ in Lua pattern matching?
\d\D%d%D\s%s\spacespacestring.matchstring.findstring.gsub%a%A%l%L%w%s%d\wLua%Lua%^Lua$%Lua+ signify in a regular expression?
\""''%b[] match in Lua?
[]capture() function{}sub() function%w+%s+\w+[a-zA-Z]+() do in Lua pattern matching?
[^%d]+%d*\D+[^0-9]string.match() function return if no match is found?
nilfalsestring.match(str, "%w+")string.match(str, "%a+")string.sub(str, "%w")string.find(str, "%w")\b match?
( character in Lua patterns?
\(\\(\/(%(| Qno | Answer (Option with the text) |
|---|---|
| 1 | b) string.find |
| 2 | a) It returns a substring from the given string |
| 3 | d) string.gsub |
| 4 | a) It returns nil |
| 5 | d) Lua does not have a built-in string split function |
| 6 | d) Both a and b |
| 7 | a) string.sub |
| 8 | a) "hallo" |
| 9 | a) string.match |
| 10 | d) Lua does not have a built-in trim function |
| 11 | a) . |
| 12 | a) Any string that starts with “a” |
| 13 | a) It matches one or more occurrences of the previous character |
| 14 | c) %d |
| 15 | b) %s |
| 16 | d) All of the above |
| 17 | a) %a |
| 18 | a) %w |
| 19 | b) %Lua% |
| 20 | a) Matches one or more occurrences of the previous element |
| 21 | a) Using a backslash \ |
| 22 | a) A balanced pair of square brackets |
| 23 | a) By enclosing the pattern in parentheses |
| 24 | a) %w+ |
| 25 | a) Captures the matched portion for later use |
| 26 | a) [^%d]+ |
| 27 | a) nil |
| 28 | a) string.match(str, "%w+") |
| 29 | a) A word boundary |
| 30 | a) \( |