Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
9
Task/Regular-expressions/Lua/regular-expressions.lua
Normal file
9
Task/Regular-expressions/Lua/regular-expressions.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
test = "My name is Lua."
|
||||
pattern = ".*name is (%a*).*"
|
||||
|
||||
if test:match(pattern) then
|
||||
print("Name found.")
|
||||
end
|
||||
|
||||
sub, num_matches = test:gsub(pattern, "Hello, %1!")
|
||||
print(sub)
|
||||
Loading…
Add table
Add a link
Reference in a new issue