function match(input, pattern) if input == nil then return false end --assert(input, "input is nil") pattern = pattern:gsub("<number>", "([0-9]+)") pattern = pattern:gsub("<string>", '"([^"]*)"') return input:match(pattern) end
Began life as a copy of #139
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
2 comment(s) hidden. show
Recognizer | Recognition Result | Visualize | Recalc |
---|---|---|---|
#308 | 243 | [visualize] |
Snippet ID: | #160 |
Snippet name: | match (for database 1) |
Eternal ID of this version: | #160/1 |
Text MD5: | 9d2aca3ed3fdb309494d528caff282b6 |
Author: | stefan |
Category: | |
Type: | Lua code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2014-01-14 02:30:58 |
Source code size: | 243 bytes / 7 lines |
Pitched / IR pitched: | Yes / Yes |
Views / Downloads: | 1185 / 233 |
Referenced in: | [show references] |