Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

6
LINES

< > BotCompany Repo | #139 // match (for +15)

Lua code

function match(input, pattern)
  if input == nil then return false end
  --assert(input, "input is nil")
  pattern = pattern:gsub("<number>", "([0-9]+)")
  return input:match(pattern)
end

test run  test run with input  download  show line numbers   

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Image recognition results

Recognizer Recognition Result Visualize Recalc
#308 192 [visualize]

Snippet ID: #139
Snippet name: match (for +15)
Eternal ID of this version: #139/1
Text MD5: 16ac11766a7cf59009c15ac86bfc9820
Author: stefan
Category:
Type: Lua code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2014-01-13 05:08:47
Source code size: 192 bytes / 6 lines
Pitched / IR pitched: Yes / Yes
Views / Downloads: 983 / 560
Referenced in: [show references]